@@ -94,23 +94,9 @@ use std::process;
9494use std:: sync:: Arc ;
9595use std:: time:: { Duration , Instant } ;
9696
97- use measureme:: { EventId , EventIdBuilder , SerializableString , StringId } ;
97+ use measureme:: { EventId , EventIdBuilder , Profiler , SerializableString , StringId } ;
9898use parking_lot:: RwLock ;
9999
100- cfg_if ! {
101- if #[ cfg( any( windows, target_os = "wasi" ) ) ] {
102- /// FileSerializationSink is faster on Windows
103- type SerializationSink = measureme:: FileSerializationSink ;
104- } else if #[ cfg( target_arch = "wasm32" ) ] {
105- type SerializationSink = measureme:: ByteVecSink ;
106- } else {
107- /// MmapSerializatioSink is faster on macOS and Linux
108- type SerializationSink = measureme:: MmapSerializationSink ;
109- }
110- }
111-
112- type Profiler = measureme:: Profiler < SerializationSink > ;
113-
114100bitflags:: bitflags! {
115101 struct EventFilter : u32 {
116102 const GENERIC_ACTIVITIES = 1 << 0 ;
@@ -389,7 +375,7 @@ impl SelfProfiler {
389375 output_directory : & Path ,
390376 crate_name : Option < & str > ,
391377 event_filters : & Option < Vec < String > > ,
392- ) -> Result < SelfProfiler , Box < dyn Error > > {
378+ ) -> Result < SelfProfiler , Box < dyn Error + Send + Sync > > {
393379 fs:: create_dir_all ( output_directory) ?;
394380
395381 let crate_name = crate_name. unwrap_or ( "unknown-crate" ) ;
@@ -500,13 +486,13 @@ impl SelfProfiler {
500486 self . event_filter_mask . contains ( EventFilter :: QUERY_KEYS )
501487 }
502488
503- pub fn event_id_builder ( & self ) -> EventIdBuilder < ' _ , SerializationSink > {
489+ pub fn event_id_builder ( & self ) -> EventIdBuilder < ' _ > {
504490 EventIdBuilder :: new ( & self . profiler )
505491 }
506492}
507493
508494#[ must_use]
509- pub struct TimingGuard < ' a > ( Option < measureme:: TimingGuard < ' a , SerializationSink > > ) ;
495+ pub struct TimingGuard < ' a > ( Option < measureme:: TimingGuard < ' a > > ) ;
510496
511497impl < ' a > TimingGuard < ' a > {
512498 #[ inline]
0 commit comments