Skip to content

Commit

Permalink
enhancement(performance): Consider jemalloc again (#10443)
Browse files Browse the repository at this point in the history
Pushing this up to see what our new soak tests say about it, motivated
#7842 (comment)

This reverts commit 3979d3a.

Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
  • Loading branch information
jszwedko committed Dec 14, 2021
1 parent 4897bf3 commit 5fe1767
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 1 deletion.
29 changes: 29 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ indexmap = { version = "~1.7.0", default-features = false, features = ["serde"]
indoc = { version = "1.0.3", default-features = false }
inventory = { version = "0.1.10", default-features = false }
k8s-openapi = { version = "0.13.1", default-features = true, features = ["api", "v1_16"], optional = true }
jemallocator = { version = "0.3.2", default-features = false, optional = true }
lazy_static = { version = "1.4.0", default-features = false }
listenfd = { version = "0.3.5", default-features = false, optional = true }
logfmt = { version = "0.0.2", default-features = false, optional = true }
Expand Down Expand Up @@ -384,7 +385,7 @@ rdkafka-plain = ["rdkafka"]
rusoto = ["rusoto_core", "rusoto_credential", "rusoto_signature", "rusoto_sts"]
sasl = ["rdkafka/gssapi"]
# Enables features that work only on systems providing `cfg(unix)`
unix = []
unix = ["jemallocator"]
# These are **very** useful on Cross compilations!
vendor-all = ["vendor-libz", "vendor-openssl", "vendor-sasl"]
vendor-sasl = ["rdkafka/gssapi-vendored"]
Expand Down
1 change: 1 addition & 0 deletions lib/vrl/tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ chrono = "0.4"
chrono-tz = "0.6"
glob = "0.3"
prettydiff = "0.5"
jemallocator = { version = "0.3.0" }
regex = "1"
serde = "1"
serde_json = "1"
Expand Down
3 changes: 3 additions & 0 deletions lib/vrl/tests/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ use vrl::{diagnostic::Formatter, state, Runtime, Terminate, Value};

use vrl_tests::{docs, Test};

#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;

#[derive(Debug, StructOpt)]
#[structopt(name = "VRL Tests", about = "Vector Remap Language Tests")]
pub struct Cmd {
Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ extern crate vector_core;
#[cfg(feature = "vrl-cli")]
extern crate vrl_cli;

#[cfg(feature = "jemallocator")]
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;

#[macro_use]
pub mod config;
pub mod cli;
Expand Down

0 comments on commit 5fe1767

Please sign in to comment.