Implements profiler for blocked recv

This commit is contained in:
Nakul Jindal 2018-02-26 09:07:08 -08:00
parent 563f0ec824
commit 7d4e2b11e9
27 changed files with 176 additions and 58 deletions

View file

@ -28,10 +28,18 @@ impl ProfilerChan {
}
}
#[derive(Clone, Deserialize, Serialize)]
pub enum ProfilerData {
NoRecords,
Record(Vec<f64>),
}
#[derive(Clone, Deserialize, Serialize)]
pub enum ProfilerMsg {
/// Normal message used for reporting time
Time((ProfilerCategory, Option<TimerMetadata>), (u64, u64), (u64, u64)),
/// Message used to get time spend entries for a particular ProfilerBuckets (in nanoseconds)
Get((ProfilerCategory, Option<TimerMetadata>), IpcSender<ProfilerData>),
/// Message used to force print the profiling metrics
Print,
/// Tells the profiler to shut down.
@ -94,6 +102,7 @@ pub enum ProfilerCategory {
TimeToFirstPaint = 0x80,
TimeToFirstContentfulPaint = 0x81,
TimeToInteractive = 0x82,
IpcReceiver = 0x83,
ApplicationHeartbeat = 0x90,
}