Skip to content

Commit 6d1dccf

Browse files
committed
fix formatting and output path
1 parent b2dabd8 commit 6d1dccf

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/cargo.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,14 @@ jobs:
117117
shell: bash
118118
run: cargo bench --bench memory_working_set
119119
env:
120-
BENCH_OUTPUT: ./bench-output.json
120+
BENCH_OUTPUT: ${{ github.workspace }}/bench-output.json
121121
- name: Create benchmark data directory
122122
shell: bash
123123
run: mkdir -p benchmarks/${{ inputs.runner }}
124124
- uses: benchmark-action/github-action-benchmark@a60cea5bc7b49e15c1f58f411161f99e0df48372 # v1.22.0
125125
with:
126126
tool: customSmallerIsBetter
127-
output-file-path: ./bench-output.json
127+
output-file-path: ${{ github.workspace }}/bench-output.json
128128
external-data-json-path: ./benchmarks/${{ inputs.runner }}/memory.json
129129
github-token: ${{ secrets.GITHUB_TOKEN }}
130130
comment-on-alert: true

crates/datadog-trace-agent/benches/memory_working_set.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,8 @@ fn main() {
422422
"unit": "KB",
423423
"value": median_peak,
424424
}]);
425-
let output_path = std::env::var("BENCH_OUTPUT").unwrap_or_else(|_| "bench-output.json".to_string());
425+
let output_path =
426+
std::env::var("BENCH_OUTPUT").unwrap_or_else(|_| "bench-output.json".to_string());
426427
std::fs::write(&output_path, json.to_string()).expect("Failed to write bench output JSON");
427428
println!("bench output written to {output_path}");
428429
}

0 commit comments

Comments
 (0)