feat(tvix/store): add LruPathInfoService

This provides an implementation of PathInfoService storing PathInfo in
memory up to a certain capacity, then evicting these that have been used
the least recently.

Change-Id: I9d738687caf4f181a957f72245f26b92832313cd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11622
Tested-by: BuildkiteCI
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Autosubmit: flokli <flokli@flokli.de>
This commit is contained in:
Florian Klink 2024-05-10 07:51:18 +03:00 committed by clbot
parent a49c32ef42
commit fe20ba5ffc
5 changed files with 341 additions and 1 deletions

View file

@ -193,6 +193,49 @@ rec {
"rustc-dep-of-std" = [ "core" "compiler_builtins" ];
};
};
"ahash" = rec {
crateName = "ahash";
version = "0.8.11";
edition = "2018";
sha256 = "04chdfkls5xmhp1d48gnjsmglbqibizs3bpbj6rsj604m10si7g8";
authors = [
"Tom Kaitchuck <Tom.Kaitchuck@gmail.com>"
];
dependencies = [
{
name = "cfg-if";
packageId = "cfg-if";
}
{
name = "once_cell";
packageId = "once_cell";
usesDefaultFeatures = false;
target = { target, features }: (!(("arm" == target."arch" or null) && ("none" == target."os" or null)));
features = [ "alloc" ];
}
{
name = "zerocopy";
packageId = "zerocopy";
usesDefaultFeatures = false;
features = [ "simd" ];
}
];
buildDependencies = [
{
name = "version_check";
packageId = "version_check";
}
];
features = {
"atomic-polyfill" = [ "dep:atomic-polyfill" "once_cell/atomic-polyfill" ];
"compile-time-rng" = [ "const-random" ];
"const-random" = [ "dep:const-random" ];
"default" = [ "std" "runtime-rng" ];
"getrandom" = [ "dep:getrandom" ];
"runtime-rng" = [ "getrandom" ];
"serde" = [ "dep:serde" ];
};
};
"aho-corasick" = rec {
crateName = "aho-corasick";
version = "1.1.2";
@ -218,6 +261,21 @@ rec {
};
resolvedDefaultFeatures = [ "default" "perf-literal" "std" ];
};
"allocator-api2" = rec {
crateName = "allocator-api2";
version = "0.2.18";
edition = "2018";
sha256 = "0kr6lfnxvnj164j1x38g97qjlhb7akppqzvgfs0697140ixbav2w";
authors = [
"Zakarum <zaq.dev@icloud.com>"
];
features = {
"default" = [ "std" ];
"serde" = [ "dep:serde" ];
"std" = [ "alloc" ];
};
resolvedDefaultFeatures = [ "alloc" ];
};
"android-tzdata" = rec {
crateName = "android-tzdata";
version = "0.1.1";
@ -4660,6 +4718,21 @@ rec {
authors = [
"Amanieu d'Antras <amanieu@gmail.com>"
];
dependencies = [
{
name = "ahash";
packageId = "ahash";
optional = true;
usesDefaultFeatures = false;
}
{
name = "allocator-api2";
packageId = "allocator-api2";
optional = true;
usesDefaultFeatures = false;
features = [ "alloc" ];
}
];
features = {
"ahash" = [ "dep:ahash" ];
"alloc" = [ "dep:alloc" ];
@ -4674,7 +4747,7 @@ rec {
"rustc-dep-of-std" = [ "nightly" "core" "compiler_builtins" "alloc" "rustc-internal-api" ];
"serde" = [ "dep:serde" ];
};
resolvedDefaultFeatures = [ "inline-more" "raw" ];
resolvedDefaultFeatures = [ "ahash" "allocator-api2" "default" "inline-more" "raw" ];
};
"heck" = rec {
crateName = "heck";
@ -6147,6 +6220,28 @@ rec {
};
resolvedDefaultFeatures = [ "std" ];
};
"lru" = rec {
crateName = "lru";
version = "0.12.3";
edition = "2015";
sha256 = "1p5hryc967wdh56q9wzb2x9gdqy3yd0sqmnb2fcf7z28wrsjw9nk";
authors = [
"Jerome Froelich <jeromefroelic@hotmail.com>"
];
dependencies = [
{
name = "hashbrown";
packageId = "hashbrown 0.14.3";
optional = true;
}
];
features = {
"default" = [ "hashbrown" ];
"hashbrown" = [ "dep:hashbrown" ];
"nightly" = [ "hashbrown" "hashbrown/nightly" ];
};
resolvedDefaultFeatures = [ "default" "hashbrown" ];
};
"lzma-sys" = rec {
crateName = "lzma-sys";
version = "0.1.20";
@ -14310,6 +14405,10 @@ rec {
name = "lazy_static";
packageId = "lazy_static";
}
{
name = "lru";
packageId = "lru";
}
{
name = "nix-compat";
packageId = "nix-compat";
@ -16832,6 +16931,67 @@ rec {
"Sergio Benitez <sb@sergio.bz>"
];
};
"zerocopy" = rec {
crateName = "zerocopy";
version = "0.7.34";
edition = "2018";
sha256 = "11xhrwixm78m6ca1jdxf584wdwvpgg7q00vg21fhwl0psvyf71xf";
authors = [
"Joshua Liebow-Feeser <joshlf@google.com>"
];
dependencies = [
{
name = "zerocopy-derive";
packageId = "zerocopy-derive";
optional = true;
}
{
name = "zerocopy-derive";
packageId = "zerocopy-derive";
target = { target, features }: false;
}
];
devDependencies = [
{
name = "zerocopy-derive";
packageId = "zerocopy-derive";
}
];
features = {
"__internal_use_only_features_that_work_on_stable" = [ "alloc" "derive" "simd" ];
"byteorder" = [ "dep:byteorder" ];
"default" = [ "byteorder" ];
"derive" = [ "zerocopy-derive" ];
"simd-nightly" = [ "simd" ];
"zerocopy-derive" = [ "dep:zerocopy-derive" ];
};
resolvedDefaultFeatures = [ "simd" ];
};
"zerocopy-derive" = rec {
crateName = "zerocopy-derive";
version = "0.7.34";
edition = "2018";
sha256 = "0fqvglw01w3hp7xj9gdk1800x9j7v58s9w8ijiyiz2a7krb39s8m";
procMacro = true;
authors = [
"Joshua Liebow-Feeser <joshlf@google.com>"
];
dependencies = [
{
name = "proc-macro2";
packageId = "proc-macro2";
}
{
name = "quote";
packageId = "quote";
}
{
name = "syn";
packageId = "syn 2.0.48";
}
];
};
"zeroize" = rec {
crateName = "zeroize";