feat(tvix): Jemalloc -> MiMalloc
Use the faster and newer MiMalloc memory allocator for all endpoints in the workspace. Change-Id: Ic60237284ed168e46ec6e8f28e2710bae4385c6f Reviewed-on: https://cl.tvl.fyi/c/depot/+/12149 Tested-by: BuildkiteCI Reviewed-by: aspen <root@gws.fyi>
This commit is contained in:
parent
000fb856be
commit
f648f17ec3
18 changed files with 153 additions and 126 deletions
49
tvix/Cargo.lock
generated
49
tvix/Cargo.lock
generated
|
@ -2073,6 +2073,16 @@ version = "0.2.8"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058"
|
||||
|
||||
[[package]]
|
||||
name = "libmimalloc-sys"
|
||||
version = "0.1.39"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23aa6811d3bd4deb8a84dde645f943476d13b248d818edcf8ce0b2f37f036b44"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libredox"
|
||||
version = "0.0.1"
|
||||
|
@ -2222,6 +2232,15 @@ dependencies = [
|
|||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mimalloc"
|
||||
version = "0.1.43"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "68914350ae34959d83f732418d51e2427a794055d0b9529f48259ac07af65633"
|
||||
dependencies = [
|
||||
"libmimalloc-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mime"
|
||||
version = "0.3.17"
|
||||
|
@ -2273,6 +2292,7 @@ dependencies = [
|
|||
"hex-literal",
|
||||
"itertools 0.12.0",
|
||||
"lru",
|
||||
"mimalloc",
|
||||
"nix-compat",
|
||||
"parking_lot 0.12.3",
|
||||
"prost 0.13.1",
|
||||
|
@ -2365,6 +2385,7 @@ dependencies = [
|
|||
"glob",
|
||||
"hex-literal",
|
||||
"lazy_static",
|
||||
"mimalloc",
|
||||
"nom",
|
||||
"num-traits",
|
||||
"pin-project-lite",
|
||||
|
@ -4148,26 +4169,6 @@ dependencies = [
|
|||
"num_cpus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tikv-jemalloc-sys"
|
||||
version = "0.5.4+5.3.0-patched"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tikv-jemallocator"
|
||||
version = "0.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "965fe0c26be5c56c94e38ba547249074803efd52adfb66de62107d95aab3eaca"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"tikv-jemalloc-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.3.34"
|
||||
|
@ -4780,6 +4781,7 @@ dependencies = [
|
|||
"bytes",
|
||||
"clap",
|
||||
"itertools 0.12.0",
|
||||
"mimalloc",
|
||||
"prost 0.13.1",
|
||||
"prost-build 0.13.1",
|
||||
"rstest",
|
||||
|
@ -4867,6 +4869,7 @@ dependencies = [
|
|||
"clap",
|
||||
"dirs",
|
||||
"expect-test",
|
||||
"mimalloc",
|
||||
"nix-compat",
|
||||
"rnix",
|
||||
"rowan",
|
||||
|
@ -4874,7 +4877,6 @@ dependencies = [
|
|||
"rustyline",
|
||||
"smol_str",
|
||||
"thiserror",
|
||||
"tikv-jemallocator",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"tracing-indicatif",
|
||||
|
@ -4904,6 +4906,7 @@ dependencies = [
|
|||
"lazy_static",
|
||||
"lexical-core",
|
||||
"md-5",
|
||||
"mimalloc",
|
||||
"os_str_bytes",
|
||||
"path-clean",
|
||||
"pretty_assertions",
|
||||
|
@ -4921,7 +4924,6 @@ dependencies = [
|
|||
"tabwriter",
|
||||
"tempfile",
|
||||
"test-strategy",
|
||||
"tikv-jemallocator",
|
||||
"toml 0.6.0",
|
||||
"tvix-eval-builtin-macros",
|
||||
]
|
||||
|
@ -4951,6 +4953,7 @@ dependencies = [
|
|||
"lazy_static",
|
||||
"magic",
|
||||
"md-5",
|
||||
"mimalloc",
|
||||
"nix 0.27.1",
|
||||
"nix-compat",
|
||||
"pin-project",
|
||||
|
@ -4963,7 +4966,6 @@ dependencies = [
|
|||
"sha2",
|
||||
"tempfile",
|
||||
"thiserror",
|
||||
"tikv-jemallocator",
|
||||
"tokio",
|
||||
"tokio-tar",
|
||||
"tokio-util",
|
||||
|
@ -5007,6 +5009,7 @@ dependencies = [
|
|||
"hyper-util",
|
||||
"lazy_static",
|
||||
"lru",
|
||||
"mimalloc",
|
||||
"nix-compat",
|
||||
"parking_lot 0.12.3",
|
||||
"pin-project-lite",
|
||||
|
|
167
tvix/Cargo.nix
167
tvix/Cargo.nix
|
@ -6484,6 +6484,32 @@ rec {
|
|||
};
|
||||
resolvedDefaultFeatures = [ "default" ];
|
||||
};
|
||||
"libmimalloc-sys" = rec {
|
||||
crateName = "libmimalloc-sys";
|
||||
version = "0.1.39";
|
||||
edition = "2018";
|
||||
links = "mimalloc";
|
||||
sha256 = "0i3b0dzz7cp0ik7ys66q92r16va78gwlbrnxhj5fnkdxsc8niai3";
|
||||
authors = [
|
||||
"Octavian Oncescu <octavonce@gmail.com>"
|
||||
];
|
||||
dependencies = [
|
||||
{
|
||||
name = "libc";
|
||||
packageId = "libc";
|
||||
}
|
||||
];
|
||||
buildDependencies = [
|
||||
{
|
||||
name = "cc";
|
||||
packageId = "cc";
|
||||
}
|
||||
];
|
||||
features = {
|
||||
"cty" = [ "dep:cty" ];
|
||||
"extended" = [ "cty" ];
|
||||
};
|
||||
};
|
||||
"libredox" = rec {
|
||||
crateName = "libredox";
|
||||
version = "0.0.1";
|
||||
|
@ -6883,6 +6909,34 @@ rec {
|
|||
features = { };
|
||||
resolvedDefaultFeatures = [ "default" ];
|
||||
};
|
||||
"mimalloc" = rec {
|
||||
crateName = "mimalloc";
|
||||
version = "0.1.43";
|
||||
edition = "2018";
|
||||
sha256 = "0csnyrxc16i592gm5ffham07jyj2w98qsh9jyy1rv59lmr8474b8";
|
||||
authors = [
|
||||
"Octavian Oncescu <octavonce@gmail.com>"
|
||||
"Vincent Rouillé <vincent@speedy37.fr>"
|
||||
"Thom Chiovoloni <chiovolonit@gmail.com>"
|
||||
];
|
||||
dependencies = [
|
||||
{
|
||||
name = "libmimalloc-sys";
|
||||
packageId = "libmimalloc-sys";
|
||||
usesDefaultFeatures = false;
|
||||
}
|
||||
];
|
||||
features = {
|
||||
"debug" = [ "libmimalloc-sys/debug" ];
|
||||
"debug_in_debug" = [ "libmimalloc-sys/debug_in_debug" ];
|
||||
"extended" = [ "libmimalloc-sys/extended" ];
|
||||
"local_dynamic_tls" = [ "libmimalloc-sys/local_dynamic_tls" ];
|
||||
"no_thp" = [ "libmimalloc-sys/no_thp" ];
|
||||
"override" = [ "libmimalloc-sys/override" ];
|
||||
"secure" = [ "libmimalloc-sys/secure" ];
|
||||
};
|
||||
resolvedDefaultFeatures = [ "default" ];
|
||||
};
|
||||
"mime" = rec {
|
||||
crateName = "mime";
|
||||
version = "0.3.17";
|
||||
|
@ -7035,6 +7089,10 @@ rec {
|
|||
name = "lru";
|
||||
packageId = "lru";
|
||||
}
|
||||
{
|
||||
name = "mimalloc";
|
||||
packageId = "mimalloc";
|
||||
}
|
||||
{
|
||||
name = "nix-compat";
|
||||
packageId = "nix-compat";
|
||||
|
@ -7372,6 +7430,10 @@ rec {
|
|||
name = "glob";
|
||||
packageId = "glob";
|
||||
}
|
||||
{
|
||||
name = "mimalloc";
|
||||
packageId = "mimalloc";
|
||||
}
|
||||
{
|
||||
name = "nom";
|
||||
packageId = "nom";
|
||||
|
@ -7429,6 +7491,10 @@ rec {
|
|||
name = "lazy_static";
|
||||
packageId = "lazy_static";
|
||||
}
|
||||
{
|
||||
name = "mimalloc";
|
||||
packageId = "mimalloc";
|
||||
}
|
||||
{
|
||||
name = "pretty_assertions";
|
||||
packageId = "pretty_assertions";
|
||||
|
@ -13059,72 +13125,6 @@ rec {
|
|||
];
|
||||
|
||||
};
|
||||
"tikv-jemalloc-sys" = rec {
|
||||
crateName = "tikv-jemalloc-sys";
|
||||
version = "0.5.4+5.3.0-patched";
|
||||
edition = "2018";
|
||||
links = "jemalloc";
|
||||
sha256 = "1lc5vm1p9dqdvd3mn3264zddnd7z6i95ch3y69prnjgxp0y480ll";
|
||||
authors = [
|
||||
"Alex Crichton <alex@alexcrichton.com>"
|
||||
"Gonzalo Brito Gadeschi <gonzalobg88@gmail.com>"
|
||||
"The TiKV Project Developers"
|
||||
];
|
||||
dependencies = [
|
||||
{
|
||||
name = "libc";
|
||||
packageId = "libc";
|
||||
usesDefaultFeatures = false;
|
||||
}
|
||||
];
|
||||
buildDependencies = [
|
||||
{
|
||||
name = "cc";
|
||||
packageId = "cc";
|
||||
}
|
||||
];
|
||||
features = {
|
||||
"background_threads" = [ "background_threads_runtime_support" ];
|
||||
"default" = [ "background_threads_runtime_support" ];
|
||||
};
|
||||
resolvedDefaultFeatures = [ "background_threads_runtime_support" ];
|
||||
};
|
||||
"tikv-jemallocator" = rec {
|
||||
crateName = "tikv-jemallocator";
|
||||
version = "0.5.4";
|
||||
edition = "2018";
|
||||
sha256 = "1jpanfm9az8hcbg6dyxdabykx03lj0j4g9cbwfa6rig5dg1f0pwn";
|
||||
authors = [
|
||||
"Alex Crichton <alex@alexcrichton.com>"
|
||||
"Gonzalo Brito Gadeschi <gonzalobg88@gmail.com>"
|
||||
"Simon Sapin <simon.sapin@exyr.org>"
|
||||
"Steven Fackler <sfackler@gmail.com>"
|
||||
"The TiKV Project Developers"
|
||||
];
|
||||
dependencies = [
|
||||
{
|
||||
name = "libc";
|
||||
packageId = "libc";
|
||||
usesDefaultFeatures = false;
|
||||
}
|
||||
{
|
||||
name = "tikv-jemalloc-sys";
|
||||
packageId = "tikv-jemalloc-sys";
|
||||
usesDefaultFeatures = false;
|
||||
}
|
||||
];
|
||||
features = {
|
||||
"background_threads" = [ "tikv-jemalloc-sys/background_threads" ];
|
||||
"background_threads_runtime_support" = [ "tikv-jemalloc-sys/background_threads_runtime_support" ];
|
||||
"debug" = [ "tikv-jemalloc-sys/debug" ];
|
||||
"default" = [ "background_threads_runtime_support" ];
|
||||
"disable_initial_exec_tls" = [ "tikv-jemalloc-sys/disable_initial_exec_tls" ];
|
||||
"profiling" = [ "tikv-jemalloc-sys/profiling" ];
|
||||
"stats" = [ "tikv-jemalloc-sys/stats" ];
|
||||
"unprefixed_malloc_on_supported_platforms" = [ "tikv-jemalloc-sys/unprefixed_malloc_on_supported_platforms" ];
|
||||
};
|
||||
resolvedDefaultFeatures = [ "background_threads_runtime_support" "default" ];
|
||||
};
|
||||
"time" = rec {
|
||||
crateName = "time";
|
||||
version = "0.3.34";
|
||||
|
@ -15530,6 +15530,10 @@ rec {
|
|||
name = "itertools";
|
||||
packageId = "itertools 0.12.0";
|
||||
}
|
||||
{
|
||||
name = "mimalloc";
|
||||
packageId = "mimalloc";
|
||||
}
|
||||
{
|
||||
name = "prost";
|
||||
packageId = "prost 0.13.1";
|
||||
|
@ -15894,6 +15898,10 @@ rec {
|
|||
name = "dirs";
|
||||
packageId = "dirs";
|
||||
}
|
||||
{
|
||||
name = "mimalloc";
|
||||
packageId = "mimalloc";
|
||||
}
|
||||
{
|
||||
name = "nix-compat";
|
||||
packageId = "nix-compat";
|
||||
|
@ -15922,11 +15930,6 @@ rec {
|
|||
name = "thiserror";
|
||||
packageId = "thiserror";
|
||||
}
|
||||
{
|
||||
name = "tikv-jemallocator";
|
||||
packageId = "tikv-jemallocator";
|
||||
target = { target, features }: (!("msvc" == target."env" or null));
|
||||
}
|
||||
{
|
||||
name = "tokio";
|
||||
packageId = "tokio";
|
||||
|
@ -16120,6 +16123,10 @@ rec {
|
|||
name = "itertools";
|
||||
packageId = "itertools 0.12.0";
|
||||
}
|
||||
{
|
||||
name = "mimalloc";
|
||||
packageId = "mimalloc";
|
||||
}
|
||||
{
|
||||
name = "pretty_assertions";
|
||||
packageId = "pretty_assertions";
|
||||
|
@ -16132,11 +16139,6 @@ rec {
|
|||
name = "tempfile";
|
||||
packageId = "tempfile";
|
||||
}
|
||||
{
|
||||
name = "tikv-jemallocator";
|
||||
packageId = "tikv-jemallocator";
|
||||
target = { target, features }: (!("msvc" == target."env" or null));
|
||||
}
|
||||
];
|
||||
features = {
|
||||
"arbitrary" = [ "proptest" "test-strategy" "imbl/proptest" ];
|
||||
|
@ -16252,11 +16254,6 @@ rec {
|
|||
name = "thiserror";
|
||||
packageId = "thiserror";
|
||||
}
|
||||
{
|
||||
name = "tikv-jemallocator";
|
||||
packageId = "tikv-jemallocator";
|
||||
target = { target, features }: (!("msvc" == target."env" or null));
|
||||
}
|
||||
{
|
||||
name = "tokio";
|
||||
packageId = "tokio";
|
||||
|
@ -16327,6 +16324,10 @@ rec {
|
|||
name = "lazy_static";
|
||||
packageId = "lazy_static";
|
||||
}
|
||||
{
|
||||
name = "mimalloc";
|
||||
packageId = "mimalloc";
|
||||
}
|
||||
{
|
||||
name = "nix";
|
||||
packageId = "nix 0.27.1";
|
||||
|
@ -16446,6 +16447,10 @@ rec {
|
|||
name = "lru";
|
||||
packageId = "lru";
|
||||
}
|
||||
{
|
||||
name = "mimalloc";
|
||||
packageId = "mimalloc";
|
||||
}
|
||||
{
|
||||
name = "nix-compat";
|
||||
packageId = "nix-compat";
|
||||
|
|
|
@ -16,6 +16,7 @@ tvix-castore = { path = "../castore" }
|
|||
tvix-tracing = { path = "../tracing" }
|
||||
tracing = "0.1.40"
|
||||
url = "2.4.0"
|
||||
mimalloc = "0.1.43"
|
||||
|
||||
[dependencies.tonic-reflection]
|
||||
optional = true
|
||||
|
|
|
@ -17,6 +17,11 @@ use tvix_build::proto::FILE_DESCRIPTOR_SET;
|
|||
#[cfg(feature = "tonic-reflection")]
|
||||
use tvix_castore::proto::FILE_DESCRIPTOR_SET as CASTORE_FILE_DESCRIPTOR_SET;
|
||||
|
||||
use mimalloc::MiMalloc;
|
||||
|
||||
#[global_allocator]
|
||||
static GLOBAL: MiMalloc = MiMalloc;
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(author, version, about, long_about = None)]
|
||||
struct Cli {
|
||||
|
|
|
@ -27,6 +27,7 @@ tokio = "1.28.0"
|
|||
tracing = "0.1.40"
|
||||
tracing-indicatif = "0.3.6"
|
||||
rustc-hash = "2.0.0"
|
||||
mimalloc = "0.1.43"
|
||||
|
||||
[dependencies.wu-manber]
|
||||
git = "https://github.com/tvlfyi/wu-manber.git"
|
||||
|
@ -34,9 +35,6 @@ git = "https://github.com/tvlfyi/wu-manber.git"
|
|||
[dev-dependencies]
|
||||
expect-test = "1.5.0"
|
||||
|
||||
[target.'cfg(not(target_env = "msvc"))'.dependencies]
|
||||
tikv-jemallocator = "0.5"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
tracy = ["tvix-tracing/tracy"]
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
use clap::Parser;
|
||||
use mimalloc::MiMalloc;
|
||||
use std::rc::Rc;
|
||||
use std::{fs, path::PathBuf};
|
||||
use tvix_cli::args::Args;
|
||||
|
@ -7,12 +8,8 @@ use tvix_cli::{init_io_handle, interpret, AllowIncomplete};
|
|||
use tvix_eval::observer::DisassemblingObserver;
|
||||
use tvix_glue::tvix_store_io::TvixStoreIO;
|
||||
|
||||
#[cfg(not(target_env = "msvc"))]
|
||||
use tikv_jemallocator::Jemalloc;
|
||||
|
||||
#[cfg(not(target_env = "msvc"))]
|
||||
#[global_allocator]
|
||||
static GLOBAL: Jemalloc = Jemalloc;
|
||||
static GLOBAL: MiMalloc = MiMalloc;
|
||||
|
||||
/// Interpret the given code snippet, but only run the Tvix compiler
|
||||
/// on it and return errors and warnings.
|
||||
|
|
|
@ -39,13 +39,11 @@ rustc-hash = "2.0.0"
|
|||
[dev-dependencies]
|
||||
criterion = "0.5"
|
||||
itertools = "0.12.0"
|
||||
mimalloc = "0.1.43"
|
||||
pretty_assertions = "1.2.1"
|
||||
rstest = "0.19.0"
|
||||
tempfile = "3.3.0"
|
||||
|
||||
[target.'cfg(not(target_env = "msvc"))'.dev-dependencies]
|
||||
tikv-jemallocator = "0.5"
|
||||
|
||||
[features]
|
||||
default = ["impure", "arbitrary", "nix_tests"]
|
||||
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
use criterion::{black_box, criterion_group, criterion_main, Criterion};
|
||||
use itertools::Itertools;
|
||||
#[cfg(not(target_env = "msvc"))]
|
||||
use tikv_jemallocator::Jemalloc;
|
||||
use mimalloc::MiMalloc;
|
||||
|
||||
#[cfg(not(target_env = "msvc"))]
|
||||
#[global_allocator]
|
||||
static GLOBAL: Jemalloc = Jemalloc;
|
||||
static GLOBAL: MiMalloc = MiMalloc;
|
||||
|
||||
fn interpret(code: &str) {
|
||||
tvix_eval::Evaluation::builder_pure()
|
||||
|
|
|
@ -36,13 +36,11 @@ clap = { version = "4.4.0", default-features = false }
|
|||
[dependencies.wu-manber]
|
||||
git = "https://github.com/tvlfyi/wu-manber.git"
|
||||
|
||||
[target.'cfg(not(target_env = "msvc"))'.dependencies]
|
||||
tikv-jemallocator = "0.5"
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = { version = "0.5", features = ["html_reports"] }
|
||||
hex-literal = "0.4.1"
|
||||
lazy_static = "1.4.0"
|
||||
mimalloc = "0.1.43"
|
||||
nix = { version = "0.27.1", features = [ "fs" ] }
|
||||
pretty_assertions = "1.4.0"
|
||||
rstest = "0.19.0"
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
use clap::Parser;
|
||||
use criterion::{black_box, criterion_group, criterion_main, Criterion};
|
||||
use lazy_static::lazy_static;
|
||||
use mimalloc::MiMalloc;
|
||||
use std::{env, rc::Rc, sync::Arc, time::Duration};
|
||||
#[cfg(not(target_env = "msvc"))]
|
||||
use tikv_jemallocator::Jemalloc;
|
||||
use tvix_build::buildservice::DummyBuildService;
|
||||
use tvix_eval::{builtins::impure_builtins, EvalIO};
|
||||
use tvix_glue::{
|
||||
|
@ -14,9 +13,8 @@ use tvix_glue::{
|
|||
};
|
||||
use tvix_store::utils::{construct_services, ServiceUrlsMemory};
|
||||
|
||||
#[cfg(not(target_env = "msvc"))]
|
||||
#[global_allocator]
|
||||
static GLOBAL: Jemalloc = Jemalloc;
|
||||
static GLOBAL: MiMalloc = MiMalloc;
|
||||
|
||||
lazy_static! {
|
||||
static ref TOKIO_RUNTIME: tokio::runtime::Runtime = tokio::runtime::Runtime::new().unwrap();
|
||||
|
|
|
@ -28,6 +28,7 @@ url = "2.4.0"
|
|||
serde = { version = "1.0.204", features = ["derive"] }
|
||||
lru = "0.12.3"
|
||||
parking_lot = "0.12.3"
|
||||
mimalloc = "0.1.43"
|
||||
|
||||
[build-dependencies]
|
||||
prost-build = "0.13.1"
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
use clap::Parser;
|
||||
use mimalloc::MiMalloc;
|
||||
use nar_bridge::AppState;
|
||||
use tower::ServiceBuilder;
|
||||
use tower_http::trace::{DefaultMakeSpan, TraceLayer};
|
||||
use tracing::info;
|
||||
use tvix_store::utils::ServiceUrlsGrpc;
|
||||
|
||||
#[global_allocator]
|
||||
static GLOBAL: MiMalloc = MiMalloc;
|
||||
|
||||
/// Expose the Nix HTTP Binary Cache protocol for a tvix-store.
|
||||
#[derive(Parser)]
|
||||
#[command(author, version, about, long_about = None)]
|
||||
|
|
|
@ -20,6 +20,7 @@ ed25519 = "2.2.3"
|
|||
ed25519-dalek = "2.1.0"
|
||||
enum-primitive-derive = "0.3.0"
|
||||
glob = "0.3.0"
|
||||
mimalloc = "0.1.43"
|
||||
nom = "7.1.3"
|
||||
num-traits = "0.2.18"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
@ -41,6 +42,7 @@ criterion = { version = "0.5", features = ["html_reports"] }
|
|||
futures = { version = "0.3.30", default-features = false, features = ["executor"] }
|
||||
hex-literal = "0.4.1"
|
||||
lazy_static = "1.4.0"
|
||||
mimalloc = "0.1.43"
|
||||
pretty_assertions = "1.4.0"
|
||||
rstest = "0.19.0"
|
||||
serde_json = "1.0"
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
use std::path::Path;
|
||||
|
||||
use criterion::{black_box, criterion_group, criterion_main, Criterion};
|
||||
use mimalloc::MiMalloc;
|
||||
use nix_compat::derivation::Derivation;
|
||||
|
||||
#[global_allocator]
|
||||
static GLOBAL: MiMalloc = MiMalloc;
|
||||
|
||||
const RESOURCES_PATHS: &str = "src/derivation/tests/derivation_tests/ok";
|
||||
|
||||
fn bench_aterm_parser(c: &mut Criterion) {
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
use criterion::{black_box, criterion_group, criterion_main, Criterion, Throughput};
|
||||
use lazy_static::lazy_static;
|
||||
use mimalloc::MiMalloc;
|
||||
use nix_compat::narinfo::NarInfo;
|
||||
use std::{io, str};
|
||||
|
||||
#[global_allocator]
|
||||
static GLOBAL: MiMalloc = MiMalloc;
|
||||
|
||||
const SAMPLE: &str = r#"StorePath: /nix/store/1pajsq519irjy86vli20bgq1wr1q3pny-banking-0.3.0
|
||||
URL: nar/0rdn027rxqbl42bv9jxhsipgq2hwqdapvwmdzligmzdmz2p9vybs.nar.xz
|
||||
Compression: xz
|
||||
|
|
|
@ -3,6 +3,11 @@ use std::{collections::BTreeMap, io::Read};
|
|||
use nix_compat::derivation::Derivation;
|
||||
use serde_json::json;
|
||||
|
||||
use mimalloc::MiMalloc;
|
||||
|
||||
#[global_allocator]
|
||||
static GLOBAL: MiMalloc = MiMalloc;
|
||||
|
||||
/// construct a serde_json::Value from a Derivation.
|
||||
/// Some environment values can be non-valid UTF-8 strings.
|
||||
/// `serde_json` prints them out really unreadable.
|
||||
|
|
|
@ -46,6 +46,7 @@ hyper-util = "0.1.6"
|
|||
toml = { version = "0.8.15", optional = true }
|
||||
tonic-health = { version = "0.12.1", default-features = false }
|
||||
redb = "2.1.1"
|
||||
mimalloc = "0.1.43"
|
||||
|
||||
[dependencies.tonic-reflection]
|
||||
optional = true
|
||||
|
|
|
@ -42,6 +42,11 @@ use tvix_castore::proto::FILE_DESCRIPTOR_SET as CASTORE_FILE_DESCRIPTOR_SET;
|
|||
#[cfg(feature = "tonic-reflection")]
|
||||
use tvix_store::proto::FILE_DESCRIPTOR_SET;
|
||||
|
||||
use mimalloc::MiMalloc;
|
||||
|
||||
#[global_allocator]
|
||||
static GLOBAL: MiMalloc = MiMalloc;
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(author, version, about, long_about = None)]
|
||||
struct Cli {
|
||||
|
|
Loading…
Reference in a new issue