mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 20:28:58 +00:00
ci: sleep 15s before running the benchmark (#382)
This commit is contained in:
parent
6811d67eb3
commit
1d617e64ff
2 changed files with 21 additions and 1 deletions
20
.github/workflows/benchmark.yml
vendored
20
.github/workflows/benchmark.yml
vendored
|
|
@ -32,6 +32,16 @@ jobs:
|
|||
- name: Compile
|
||||
run: cargo build --release -p oxc_benchmark
|
||||
|
||||
- name: Sleep for CPU cooldown (windows)
|
||||
if: runner.os == 'Windows'
|
||||
shell: powershell
|
||||
run: Start-Sleep -s 15
|
||||
|
||||
- name: Sleep for CPU cooldown
|
||||
if: runner.os != 'Windows'
|
||||
shell: bash
|
||||
run: sleep 15s
|
||||
|
||||
- name: Run Bench on PR Branch
|
||||
run: cargo benchmark --save-baseline pr
|
||||
|
||||
|
|
@ -44,6 +54,16 @@ jobs:
|
|||
- name: Compile
|
||||
run: cargo build --release -p oxc_benchmark
|
||||
|
||||
- name: Sleep for CPU cooldown (windows)
|
||||
if: runner.os == 'Windows'
|
||||
shell: powershell
|
||||
run: Start-Sleep -s 15
|
||||
|
||||
- name: Sleep for CPU cooldown
|
||||
if: runner.os != 'Windows'
|
||||
shell: bash
|
||||
run: sleep 15s
|
||||
|
||||
- name: Run Bench on Main Branch
|
||||
run: cargo benchmark --save-baseline main
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ pub fn main() -> Result<(), String> {
|
|||
let mut args = Arguments::from_env();
|
||||
|
||||
let baseline: Option<String> = args.opt_value_from_str("--save-baseline").unwrap();
|
||||
let measurement_time = Duration::new(/* seconds */ 10, 0);
|
||||
let measurement_time = Duration::new(/* seconds */ 15, 0);
|
||||
let mut criterion = Criterion::default().without_plots().measurement_time(measurement_time);
|
||||
if let Some(ref baseline) = baseline {
|
||||
criterion = criterion.save_baseline(baseline.to_string());
|
||||
|
|
|
|||
Loading…
Reference in a new issue