-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathfifo.rs
More file actions
33 lines (29 loc) · 1.08 KB
/
fifo.rs
File metadata and controls
33 lines (29 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//! WARNING: Has to be in sync with `instrument-hooks`.
pub const RUNNER_CTL_FIFO: &str = "/tmp/runner.ctl.fifo";
pub const RUNNER_ACK_FIFO: &str = "/tmp/runner.ack.fifo";
pub const CURRENT_PROTOCOL_VERSION: u64 = 1;
/// The different markers that can be set in the perf.data.
///
/// `SampleStart/End`: Marks the start and end of a sampling period. This is used to differentiate between benchmarks.
/// `BenchmarkStart/End`: Marks the start and end of a benchmark. This is used to measure the duration of a benchmark, without the benchmark harness code.
#[derive(
serde::Serialize, serde::Deserialize, Debug, PartialEq, Eq, PartialOrd, Ord, Copy, Clone,
)]
pub enum MarkerType {
SampleStart(u64),
SampleEnd(u64),
BenchmarkStart(u64),
BenchmarkEnd(u64),
}
#[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
pub enum Command {
CurrentBenchmark { pid: i32, uri: String },
StartBenchmark,
StopBenchmark,
Ack,
PingPerf,
SetIntegration { name: String, version: String },
Err,
AddMarker { pid: i32, marker: MarkerType },
SetVersion(u64),
}