|
1 | 1 | use crate::timestamp::Timestamp; |
2 | 2 | use crate::{Event, ProfilingData}; |
3 | | -use measureme::{EventId, EventIdBuilder, Profiler, SerializationSink, StringId}; |
| 3 | +use measureme::{EventId, EventIdBuilder, Profiler, StringId}; |
4 | 4 | use rustc_hash::FxHashMap; |
5 | 5 | use std::borrow::Cow; |
6 | 6 | use std::default::Default; |
@@ -36,12 +36,12 @@ impl ExpectedEvent { |
36 | 36 | } |
37 | 37 |
|
38 | 38 | // Generate some profiling data. This is the part that would run in rustc. |
39 | | -fn generate_profiling_data<S: SerializationSink>( |
| 39 | +fn generate_profiling_data( |
40 | 40 | filestem: &Path, |
41 | 41 | num_stacks: usize, |
42 | 42 | num_threads: usize, |
43 | 43 | ) -> Vec<Event<'static>> { |
44 | | - let profiler = Arc::new(Profiler::<S>::new(Path::new(filestem)).unwrap()); |
| 44 | + let profiler = Arc::new(Profiler::new(Path::new(filestem)).unwrap()); |
45 | 45 |
|
46 | 46 | let event_id_virtual = EventId::from_label(StringId::new_virtual(42)); |
47 | 47 | let event_id_builder = EventIdBuilder::new(&profiler); |
@@ -187,26 +187,19 @@ fn collect_events_per_thread<'a>( |
187 | 187 | per_thread |
188 | 188 | } |
189 | 189 |
|
190 | | -pub fn run_serialization_bench<S: SerializationSink>( |
191 | | - file_name_stem: &str, |
192 | | - num_events: usize, |
193 | | - num_threads: usize, |
194 | | -) { |
| 190 | +pub fn run_serialization_bench(file_name_stem: &str, num_events: usize, num_threads: usize) { |
195 | 191 | let filestem = mk_filestem(file_name_stem); |
196 | | - generate_profiling_data::<S>(&filestem, num_events, num_threads); |
| 192 | + generate_profiling_data(&filestem, num_events, num_threads); |
197 | 193 | } |
198 | 194 |
|
199 | | -pub fn run_end_to_end_serialization_test<S: SerializationSink>( |
200 | | - file_name_stem: &str, |
201 | | - num_threads: usize, |
202 | | -) { |
| 195 | +pub fn run_end_to_end_serialization_test(file_name_stem: &str, num_threads: usize) { |
203 | 196 | let filestem = mk_filestem(file_name_stem); |
204 | | - let expected_events = generate_profiling_data::<S>(&filestem, 10_000, num_threads); |
| 197 | + let expected_events = generate_profiling_data(&filestem, 10_000, num_threads); |
205 | 198 | process_profiling_data(&filestem, &expected_events); |
206 | 199 | } |
207 | 200 |
|
208 | | -fn pseudo_invocation<S: SerializationSink>( |
209 | | - profiler: &Profiler<S>, |
| 201 | +fn pseudo_invocation( |
| 202 | + profiler: &Profiler, |
210 | 203 | random: usize, |
211 | 204 | thread_id: u32, |
212 | 205 | recursions_left: usize, |
|
0 commit comments