Loading pkgs/tools/misc/vector/Cargo.lock +11 −11 Original line number Diff line number Diff line Loading @@ -1145,7 +1145,7 @@ dependencies = [ "aws-smithy-types", "bytes 1.5.0", "fastrand 2.0.1", "h2 0.3.24", "h2 0.3.26", "http 0.2.9", "http-body 0.4.5", "hyper 0.14.28", Loading Loading @@ -3747,9 +3747,9 @@ dependencies = [ [[package]] name = "h2" version = "0.3.24" version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes 1.5.0", "fnv", Loading @@ -3766,9 +3766,9 @@ dependencies = [ [[package]] name = "h2" version = "0.4.3" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51ee2dd2e4f378392eeff5d51618cd9a63166a2513846bbc55f21cfacd9199d4" checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" dependencies = [ "bytes 1.5.0", "fnv", Loading Loading @@ -4210,14 +4210,14 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", "h2 0.3.24", "h2 0.3.26", "http 0.2.9", "http-body 0.4.5", "httparse", "httpdate", "itoa", "pin-project-lite", "socket2 0.5.6", "socket2 0.4.10", "tokio", "tower-service", "tracing 0.1.40", Loading Loading @@ -7515,7 +7515,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", "h2 0.3.24", "h2 0.3.26", "http 0.2.9", "http-body 0.4.5", "hyper 0.14.28", Loading Loading @@ -9371,7 +9371,7 @@ dependencies = [ "base64 0.21.7", "bytes 1.5.0", "flate2", "h2 0.3.24", "h2 0.3.26", "http 0.2.9", "http-body 0.4.5", "hyper 0.14.28", Loading Loading @@ -10017,7 +10017,7 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "vector" version = "0.37.0" version = "0.37.1" dependencies = [ "apache-avro", "approx", Loading Loading @@ -10083,7 +10083,7 @@ dependencies = [ "governor", "greptimedb-client", "grok", "h2 0.4.3", "h2 0.4.4", "hash_hasher", "hashbrown 0.14.3", "headers", Loading pkgs/tools/misc/vector/default.nix +4 −7 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ let pname = "vector"; version = "0.37.0"; version = "0.37.1"; in rustPlatform.buildRustPackage { inherit pname version; Loading @@ -46,16 +46,13 @@ rustPlatform.buildRustPackage { owner = "vectordotdev"; repo = pname; rev = "v${version}"; hash = "sha256-v93ZsNGoswPpey409V7qKqsBsfRt5pgY5PxGti4MlDg="; hash = "sha256-wRXwgy+UY2z5fIWpQbDxRti54GE357WMGWXM/xKjz18="; }; patches = [ # Enable LTO to bring down binary size (fetchpatch { name = "vector-20034-lto.patch"; url = "https://patch-diff.githubusercontent.com/raw/vectordotdev/vector/pull/20034.diff"; hash = "sha256-X6YWnW0x5WpKAgyqIaLjKF1F1/G4JgvmNhAHtozXrPQ="; }) # Adapted from https://github.com/vectordotdev/vector/pull/20034 ./vector-lto.patch ]; cargoLock = { Loading pkgs/tools/misc/vector/vector-lto.patch 0 → 100644 +12 −0 Original line number Diff line number Diff line --- ./Cargo.toml 2024-04-10 00:01:12.033806583 +0100 +++ ./Cargo.toml 2024-04-10 00:01:48.324228125 +0100 @@ -45,7 +45,8 @@ path = "tests/e2e/mod.rs" # This results in roughly a 5% reduction in performance when compiling locally vs when # compiled via the CI pipeline. [profile.release] -debug = false # Do not include debug symbols in the executable. +lto = true +codegen-units = 1 [profile.bench] debug = true Loading
pkgs/tools/misc/vector/Cargo.lock +11 −11 Original line number Diff line number Diff line Loading @@ -1145,7 +1145,7 @@ dependencies = [ "aws-smithy-types", "bytes 1.5.0", "fastrand 2.0.1", "h2 0.3.24", "h2 0.3.26", "http 0.2.9", "http-body 0.4.5", "hyper 0.14.28", Loading Loading @@ -3747,9 +3747,9 @@ dependencies = [ [[package]] name = "h2" version = "0.3.24" version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes 1.5.0", "fnv", Loading @@ -3766,9 +3766,9 @@ dependencies = [ [[package]] name = "h2" version = "0.4.3" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51ee2dd2e4f378392eeff5d51618cd9a63166a2513846bbc55f21cfacd9199d4" checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" dependencies = [ "bytes 1.5.0", "fnv", Loading Loading @@ -4210,14 +4210,14 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", "h2 0.3.24", "h2 0.3.26", "http 0.2.9", "http-body 0.4.5", "httparse", "httpdate", "itoa", "pin-project-lite", "socket2 0.5.6", "socket2 0.4.10", "tokio", "tower-service", "tracing 0.1.40", Loading Loading @@ -7515,7 +7515,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", "h2 0.3.24", "h2 0.3.26", "http 0.2.9", "http-body 0.4.5", "hyper 0.14.28", Loading Loading @@ -9371,7 +9371,7 @@ dependencies = [ "base64 0.21.7", "bytes 1.5.0", "flate2", "h2 0.3.24", "h2 0.3.26", "http 0.2.9", "http-body 0.4.5", "hyper 0.14.28", Loading Loading @@ -10017,7 +10017,7 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "vector" version = "0.37.0" version = "0.37.1" dependencies = [ "apache-avro", "approx", Loading Loading @@ -10083,7 +10083,7 @@ dependencies = [ "governor", "greptimedb-client", "grok", "h2 0.4.3", "h2 0.4.4", "hash_hasher", "hashbrown 0.14.3", "headers", Loading
pkgs/tools/misc/vector/default.nix +4 −7 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ let pname = "vector"; version = "0.37.0"; version = "0.37.1"; in rustPlatform.buildRustPackage { inherit pname version; Loading @@ -46,16 +46,13 @@ rustPlatform.buildRustPackage { owner = "vectordotdev"; repo = pname; rev = "v${version}"; hash = "sha256-v93ZsNGoswPpey409V7qKqsBsfRt5pgY5PxGti4MlDg="; hash = "sha256-wRXwgy+UY2z5fIWpQbDxRti54GE357WMGWXM/xKjz18="; }; patches = [ # Enable LTO to bring down binary size (fetchpatch { name = "vector-20034-lto.patch"; url = "https://patch-diff.githubusercontent.com/raw/vectordotdev/vector/pull/20034.diff"; hash = "sha256-X6YWnW0x5WpKAgyqIaLjKF1F1/G4JgvmNhAHtozXrPQ="; }) # Adapted from https://github.com/vectordotdev/vector/pull/20034 ./vector-lto.patch ]; cargoLock = { Loading
pkgs/tools/misc/vector/vector-lto.patch 0 → 100644 +12 −0 Original line number Diff line number Diff line --- ./Cargo.toml 2024-04-10 00:01:12.033806583 +0100 +++ ./Cargo.toml 2024-04-10 00:01:48.324228125 +0100 @@ -45,7 +45,8 @@ path = "tests/e2e/mod.rs" # This results in roughly a 5% reduction in performance when compiling locally vs when # compiled via the CI pipeline. [profile.release] -debug = false # Do not include debug symbols in the executable. +lto = true +codegen-units = 1 [profile.bench] debug = true