File tree Expand file tree Collapse file tree
src/run/runner/wall_time/perf Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33pub const RUNNER_CTL_FIFO : & str = "/tmp/runner.ctl.fifo" ;
44pub const RUNNER_ACK_FIFO : & str = "/tmp/runner.ack.fifo" ;
55
6+ pub const CURRENT_PROTOCOL_VERSION : u64 = 1 ;
7+
68/// The different markers that can be set in the perf.data.
79///
810/// `SampleStart/End`: Marks the start and end of a sampling period. This is used to differentiate between benchmarks.
@@ -27,4 +29,5 @@ pub enum Command {
2729 SetIntegration { name : String , version : String } ,
2830 Err ,
2931 AddMarker { pid : u32 , marker : MarkerType } ,
32+ SetVersion ( u64 ) ,
3033}
Original file line number Diff line number Diff line change @@ -337,6 +337,15 @@ impl PerfRunner {
337337 markers. push ( marker) ;
338338 runner_fifo. send_cmd ( FifoCommand :: Ack ) . await ?;
339339 }
340+ FifoCommand :: SetVersion ( protocol_version) => {
341+ if protocol_version != runner_shared:: fifo:: CURRENT_PROTOCOL_VERSION {
342+ panic ! (
343+ "Integration is outdated, please update the codspeed integration to the latest version."
344+ ) ;
345+ }
346+
347+ runner_fifo. send_cmd ( FifoCommand :: Ack ) . await ?;
348+ }
340349 _ => {
341350 warn ! ( "Received unexpected command: {cmd:?}" ) ;
342351 runner_fifo. send_cmd ( FifoCommand :: Err ) . await ?;
You can’t perform that action at this time.
0 commit comments