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