|
1 | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |
2 | 2 | // SPDX-License-Identifier: Apache-2.0 |
3 | 3 |
|
4 | | -use bench::{ |
5 | | - harness::{TlsBenchConfig, TlsInfo}, |
6 | | - CipherSuite, CryptoConfig, HandshakeType, KXGroup, S2NConnection, SigType, TlsConnPair, |
7 | | - TlsConnection, |
8 | | -}; |
| 4 | +use benchmarks::*; |
| 5 | +use tls_harness::cohort::S2NConnection; |
| 6 | + |
9 | 7 | use criterion::{ |
10 | 8 | criterion_group, criterion_main, measurement::WallTime, BatchSize, BenchmarkGroup, Criterion, |
11 | 9 | }; |
| 10 | +use tls_harness::{harness::TlsInfo, SigType, TlsConnection}; |
12 | 11 |
|
13 | 12 | fn bench_handshake_pair<T>(bench_group: &mut BenchmarkGroup<WallTime>, sig_type: SigType) |
14 | 13 | where |
|
21 | 20 | bench_group.bench_function(format!("{:?}-{}", handshake, T::name()), |b| { |
22 | 21 | b.iter_batched_ref( |
23 | 22 | || { |
24 | | - TlsConnPair::<T, T>::new_bench_pair( |
| 23 | + new_bench_pair::<T, T>( |
25 | 24 | CryptoConfig::new(CipherSuite::default(), KXGroup::default(), sig_type), |
26 | 25 | handshake, |
27 | 26 | ) |
|
46 | 45 | bench_group.bench_function(format!("{:?}-{}", handshake, T::name()), |b| { |
47 | 46 | b.iter_batched_ref( |
48 | 47 | || { |
49 | | - let mut pair = TlsConnPair::<T, T>::new_bench_pair( |
| 48 | + let mut pair = new_bench_pair::<T, T>( |
50 | 49 | CryptoConfig::new(CipherSuite::default(), KXGroup::default(), sig_type), |
51 | 50 | handshake, |
52 | 51 | ) |
|
0 commit comments