Skip to content

Commit f7cf9ab

Browse files
committed
Perf tests
1 parent 3a4766b commit f7cf9ab

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.evergreen/generated_configs/functions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ functions:
9292
binary: bash
9393
args:
9494
- -c
95-
- "if [ -f .evergreen/scripts/env.sh ]; then . .evergreen/scripts/env.sh; fi; if [ \"Windows_NT\" = \"${OS:-}\" ]; then CARGO_BIN=\"$USERPROFILE/.cargo/bin\"; else CARGO_BIN=\"$HOME/.cargo/bin\"; fi; export PATH=\"$CARGO_BIN:$PATH\"; if ! command -v cargo &> /dev/null; then echo \"Installing Rust...\"; curl --proto \"=https\" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y; if [ -f \"$HOME/.cargo/env\" ]; then . \"$HOME/.cargo/env\"; fi; fi; if command -v cargo &> /dev/null && ! command -v maturin &> /dev/null; then echo \"Installing maturin...\"; pip install maturin; fi; echo \"Rust toolchain: $(rustc --version 2>/dev/null || echo not found)\"; echo \"Cargo: $(cargo --version 2>/dev/null || echo not found)\"; echo \"Maturin: $(maturin --version 2>/dev/null || echo not found)\"; if [ -f .evergreen/scripts/env.sh ]; then echo \"export PATH=\\\"$CARGO_BIN:\\$PATH\\\"\" >> .evergreen/scripts/env.sh; fi; bash .evergreen/just.sh setup-tests perf \"\"; export FASTBENCH=1; bash .evergreen/just.sh run-tests TestRustSimpleIntEncodingC TestRustSimpleIntEncodingRust TestRustMixedTypesEncodingC TestRustMixedTypesEncodingRust TestRustSimpleIntDecodingC TestRustSimpleIntDecodingRust TestRustNestedEncodingC TestRustNestedEncodingRust TestRustListEncodingC TestRustListEncodingRust"
95+
- "if [ -f .evergreen/scripts/env.sh ]; then . .evergreen/scripts/env.sh; fi; if [ \"Windows_NT\" = \"${OS:-}\" ]; then CARGO_BIN=\"$USERPROFILE/.cargo/bin\"; else CARGO_BIN=\"$HOME/.cargo/bin\"; fi; export PATH=\"$CARGO_BIN:$PATH\"; if ! command -v cargo &> /dev/null; then echo \"Installing Rust...\"; curl --proto \"=https\" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y; if [ -f \"$HOME/.cargo/env\" ]; then . \"$HOME/.cargo/env\"; fi; fi; if command -v cargo &> /dev/null && ! command -v maturin &> /dev/null; then echo \"Installing maturin...\"; pip install maturin; fi; echo \"Rust toolchain: $(rustc --version 2>/dev/null || echo not found)\"; echo \"Cargo: $(cargo --version 2>/dev/null || echo not found)\"; echo \"Maturin: $(maturin --version 2>/dev/null || echo not found)\"; if [ -f .evergreen/scripts/env.sh ]; then echo \"export PATH=\\\"$CARGO_BIN:\\$PATH\\\"\" >> .evergreen/scripts/env.sh; fi; bash .evergreen/just.sh setup-tests perf rust; export FASTBENCH=1; bash .evergreen/just.sh run-tests TestRustSimpleIntEncodingC TestRustSimpleIntEncodingRust TestRustMixedTypesEncodingC TestRustMixedTypesEncodingRust TestRustSimpleIntDecodingC TestRustSimpleIntDecodingRust TestRustNestedEncodingC TestRustNestedEncodingRust TestRustListEncodingC TestRustListEncodingRust"
9696
working_dir: src
9797
include_expansions_in_env:
9898
- PYMONGO_BUILD_RUST

.evergreen/scripts/generate_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,7 @@ def create_perf_rust_func():
14361436
'echo "export PATH=\\"$CARGO_BIN:\\$PATH\\"" >> .evergreen/scripts/env.sh; '
14371437
"fi; "
14381438
# Set up the test environment with perf extras
1439-
'bash .evergreen/just.sh setup-tests perf ""; '
1439+
"bash .evergreen/just.sh setup-tests perf rust; "
14401440
# Run the Rust-specific performance benchmarks
14411441
# These tests compare C vs Rust BSON encoding/decoding performance
14421442
"export FASTBENCH=1; "

.evergreen/scripts/setup_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ def handle_test_env() -> None:
449449

450450
# PYTHON-4769 Run perf_test.py directly otherwise pytest's test collection negatively
451451
# affects the benchmark results.
452-
if sub_test_name == "sync":
452+
if sub_test_name == "sync" or sub_test_name == "rust":
453453
TEST_ARGS = f"test/performance/perf_test.py {TEST_ARGS}"
454454
else:
455455
TEST_ARGS = f"test/performance/async_perf_test.py {TEST_ARGS}"

0 commit comments

Comments
 (0)