mirror of
https://github.com/ModernRelay/omnigraph.git
synced 2026-07-12 03:12:11 +02:00
fix(bench): restore the cfg(unix) gate displaced by the results-log insertion
Both review bots caught it: the new fns were inserted between run_once's cfg(unix) attribute and the fn itself, leaving append_result, git_sha, and run_once ungated (non-unix name-resolution break, again). All three gated; results_path keeps the displaced attribute.
This commit is contained in:
parent
80db05f16e
commit
db217e7db2
1 changed files with 3 additions and 0 deletions
|
|
@ -187,6 +187,7 @@ fn results_path(args: &Args) -> std::path::PathBuf {
|
|||
std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("benches/results.jsonl")
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn append_result(args: &Args, record: &serde_json::Value) {
|
||||
let path = results_path(args);
|
||||
let appended = std::fs::OpenOptions::new()
|
||||
|
|
@ -202,6 +203,7 @@ fn append_result(args: &Args, record: &serde_json::Value) {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn git_sha() -> Option<String> {
|
||||
let out = std::process::Command::new("git")
|
||||
.args(["rev-parse", "--short", "HEAD"])
|
||||
|
|
@ -213,6 +215,7 @@ fn git_sha() -> Option<String> {
|
|||
.then(|| String::from_utf8_lossy(&out.stdout).trim().to_string())
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn run_once(args: &Args, run: usize) -> serde_json::Value {
|
||||
let exe = std::env::current_exe().expect("current_exe");
|
||||
let mut child = std::process::Command::new(exe)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue