From 0b05b988a440d50237a77f00f2b83b1abec2978c Mon Sep 17 00:00:00 2001 From: Harsh Modi Date: Sun, 17 Mar 2024 13:58:58 +0000 Subject: [PATCH] use jemalloc --- blade/BUILD.bazel | 1 + blade/main.rs | 4 + blade/routes/app.rs | 11 - flake.nix | 1 + nix/bazel/env.nix | 1 + third_party/rust/Cargo.Bazel.lock | 939 +++++++++++++++----------- third_party/rust/Cargo.lock | 21 + third_party/rust/WasmCargo.Bazel.lock | 426 ++++++------ third_party/rust/deps.bzl | 4 + 9 files changed, 790 insertions(+), 618 deletions(-) diff --git a/blade/BUILD.bazel b/blade/BUILD.bazel index fc1bfec..4b1b3a6 100644 --- a/blade/BUILD.bazel +++ b/blade/BUILD.bazel @@ -51,6 +51,7 @@ rust_binary( "@crate//:log", "@crate//:prometheus-client", "@crate//:serde", + "@crate//:tikv-jemallocator", "@crate//:time", "@crate//:tokio", "@crate//:tokio-stream", diff --git a/blade/main.rs b/blade/main.rs index 8a95b6e..95a0713 100644 --- a/blade/main.rs +++ b/blade/main.rs @@ -39,11 +39,15 @@ cfg_if! { use lazy_static::lazy_static; use prometheus_client::metrics::family::Family; use prometheus_client::metrics::counter::Counter; + use tikv_jemallocator::Jemalloc; pub mod admin; use crate::routes::app::App; + #[global_allocator] + static GLOBAL: Jemalloc = Jemalloc; + lazy_static! { static ref API_ERRORS: Family:: = metrics::register_metric("blade_http_errors", "Actix API requests errors", Family::default()); static ref API_REQUESTS: Family:: = metrics::register_metric("blade_http_requests", "Actix API requests", Family::default()); diff --git a/blade/routes/app.rs b/blade/routes/app.rs index 0d0b13d..ba62343 100644 --- a/blade/routes/app.rs +++ b/blade/routes/app.rs @@ -1,10 +1,5 @@ use crate::components::nav::Nav; -use crate::routes::artifact::Artifact; -use crate::routes::details::Details; use crate::routes::empty::Empty; -use crate::routes::invocation::Invocation; -use crate::routes::summary::Summary; -use crate::routes::test::Test; use leptos::*; use leptos_meta::*; use leptos_router::*; @@ -27,12 +22,6 @@ pub fn App() -> impl IntoView {