-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathrun_once_gungraun.rs
More file actions
23 lines (18 loc) · 863 Bytes
/
run_once_gungraun.rs
File metadata and controls
23 lines (18 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
mod benchmark_util;
use benchmark_util::setup_network;
use graphene_std::application_io;
use gungraun::prelude::*;
use interpreted_executor::dynamic_executor::DynamicExecutor;
use std::hint::black_box;
fn setup_run_once(name: &str) -> DynamicExecutor {
let (executor, _) = setup_network(name);
executor
}
#[library_benchmark]
#[benches::with_setup(args = ["isometric-fountain", "painted-dreams", "procedural-string-lights", "parametric-dunescape", "red-dress", "valley-of-spires"], setup = setup_run_once)]
pub fn run_once(executor: DynamicExecutor) {
let context = application_io::RenderConfig::default();
black_box(futures::executor::block_on(executor.tree().eval_tagged_value(executor.output(), black_box(context))).unwrap());
}
library_benchmark_group!(name = run_once_group; benchmarks = run_once);
main!(library_benchmark_groups = run_once_group);