Skip to content

Commit

Permalink
Merge branch 'rename-ic-boundary-bench' into 'master'
Browse files Browse the repository at this point in the history
(BOUN-1129) change naming in `ic-boundary` benchmark

- `benchmark_group` is now called with a more speaking name `ic_boundary_router` instead of (`rps`).
- Explicit function name is introduced `response_time_vs_request_size_bytes`.

Folder structure is now:
```
❯ tree ./target/criterion
├── ic_boundary_router
│   ├── report
│   └── response_time_vs_request_size_bytes
│       ├── 1024
│       │   ├── base
│       │   │   ├── benchmark.json
│       │   ├── new
│       │   │   ├── benchmark.json
│       │   └── report
│       │       ...
│       ├── 16384
│       │   ...
│       ├── 4096
│       │   ...
│       ├── 8192
│       │   ...
│       └── report
│           ├── index.html
│           └── violin.svg
└── report
    └── index.html
```

Compared to previous:
```
❯ tree ./target/criterion
└── rps
    ├── 1024
    │   └── report
    │       ├── ...
    ├── 16384
    │   ...
    ├── 4096
    │   ...
    ├── 8192
    │   ...
    └── report
``` 

See merge request dfinity-lab/public/ic!19068
  • Loading branch information
r-birkner committed May 3, 2024
2 parents cdf64b8 + 208ebe0 commit 96f4ab3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions rs/boundary_node/ic_boundary/benches/perf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ fn gen_request(cli: &reqwest::Client, addr: &SocketAddr, bytes_size: usize) -> r
}

fn benchmark(c: &mut Criterion) {
let mut group = c.benchmark_group("ic_boundary_router");
group.throughput(Throughput::Elements(1));
group.significance_level(0.1);
group.sample_size(250);
group.measurement_time(Duration::from_secs(15));

let (app, _) = setup_test_router(true, true, 40, 15, 16384);

let listener = TcpListener::bind("127.0.0.1:0").unwrap();
Expand All @@ -69,15 +75,9 @@ fn benchmark(c: &mut Criterion) {

let cli = reqwest::ClientBuilder::new().build().unwrap();

let mut group = c.benchmark_group("rps");
group.throughput(Throughput::Elements(1));
group.significance_level(0.1);
group.sample_size(250);
group.measurement_time(Duration::from_secs(15));

for req_size in [1024, 4096, 8192, 16384].iter() {
group.bench_with_input(
BenchmarkId::from_parameter(req_size),
BenchmarkId::new("response_time_vs_request_size_bytes", req_size),
req_size,
|b, &size| {
b.to_async(&runtime).iter_batched(
Expand Down

0 comments on commit 96f4ab3

Please sign in to comment.