git.delta.rocks / jrsonnet / refs/commits / 604f09da5796

difftreelog

fix only build benchmarker for x86_64-linux

oqtmzxprYaroslav Bolyukin2026-05-06parent: #3e1d397.patch.diff
in: master

3 files changed

modifiedxtask/Cargo.tomldiffbeforeafterboth
18xshell.workspace = true18xshell.workspace = true
19clap = { workspace = true, features = ["derive"] }19clap = { workspace = true, features = ["derive"] }
2020
21[target.'cfg(target_os = "linux")'.dependencies]21[target.'cfg(all(target_arch = "x86_64", target_os = "linux"))'.dependencies]
22nix.workspace = true22nix.workspace = true
2323
modifiedxtask/src/bench.rsdiffbeforeafterboth
1#![allow(clippy::cast_precision_loss)]
2
1use std::{3use std::{
2 ffi::OsString,4 ffi::OsString,
modifiedxtask/src/main.rsdiffbeforeafterboth
1use anyhow::Result;1use anyhow::Result;
2#[cfg(not(target_os = "linux"))]
3use anyhow::bail;
4use clap::Parser;2use clap::Parser;
5use xshell::{Shell, cmd};3use xshell::{Shell, cmd};
64
7#[cfg(target_os = "linux")]5#[cfg(all(target_arch = "x86_64", target_os = "linux"))]
8mod bench;6mod bench;
9mod sourcegen;7mod sourcegen;
108
40 args: Vec<String>,38 args: Vec<String>,
41 },39 },
42 /// Benchmark a command: repeated runs, reports time + RSS stats (Linux only)40 /// Benchmark a command: repeated runs, reports time + RSS stats (Linux only)
41 #[cfg(all(target_arch = "x86_64", target_os = "linux"))]
43 Bench {42 Bench {
44 #[arg(long, default_value_t = 10)]43 #[arg(long, default_value_t = 10)]
45 runs: u32,44 runs: u32,
121120
122 Ok(())121 Ok(())
123 }122 }
124 #[cfg(target_os = "linux")]123 #[cfg(all(target_arch = "x86_64", target_os = "linux"))]
125 Opts::Bench {124 Opts::Bench {
126 runs,125 runs,
127 warmup,126 warmup,