Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ reqwest-retry = "0.9"
serde = { workspace = true }
serde_json = { workspace = true, features = ["preserve_order"] }
url = "2.5.8"
hyper = { version = "1.9", features = ["server", "http1"] }
hyper-util = { version = "0.1.20", features = ["tokio"] }
http-body-util = "0.1.3"
sha256 = "1.6"
tokio = { version = "1", features = ["macros", "rt", "process"] }
tokio = { version = "1", features = ["fs", "macros", "net", "rt", "sync", "process"] }
tokio-tar = { package = "astral-tokio-tar", version = "0.6.2" }
tokio-util = "0.7.18"
crc-fast = { version = "1.9.0", default-features = false, features = ["std"] }
Expand Down Expand Up @@ -79,6 +82,13 @@ which = "8.0.2"
crc32fast = "1.5.0"
samply = { path = "crates/samply-codspeed/samply" }
bytes = "1"
opentelemetry-proto = { version = "0.33", default-features = false, features = [
"gen-tonic-messages",
"trace",
"logs",
"with-serde",
] }
prost = "0.14"

# Memory profiling (memtrack) and the capability handling around it are Linux-only.
[target.'cfg(target_os = "linux")'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/exec-harness/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub fn execute_benchmarks(

match measurement_mode {
MeasurementMode::Walltime => walltime::perform(commands),
MeasurementMode::Memory => analysis::perform(commands),
MeasurementMode::Memory | MeasurementMode::Telemetry => analysis::perform(commands),
MeasurementMode::Simulation => analysis::perform_with_valgrind(commands),
}
}
6 changes: 6 additions & 0 deletions crates/instrument-hooks-bindings/src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ unsafe extern "C" {
unsafe extern "C" {
pub fn instrument_hooks_current_timestamp() -> u64;
}
unsafe extern "C" {
pub fn instrument_hooks_monotonic_offset() -> i64;
}
unsafe extern "C" {
pub fn instrument_hooks_callgrind_add_obj_skip(path: *const ::std::os::raw::c_char) -> u8;
}
pub const instrument_hooks_feature_t_FEATURE_DISABLE_CALLGRIND_MARKERS: instrument_hooks_feature_t =
0;
pub type instrument_hooks_feature_t = ::std::os::raw::c_uint;
Expand Down
4 changes: 3 additions & 1 deletion crates/runner-shared/benches/memtrack_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ fn sizes() -> &'static [usize] {
.ok()
.and_then(|mode| MeasurementMode::from_str(&mode, true).ok());
match mode {
Some(MeasurementMode::Simulation | MeasurementMode::Memory) => ANALYSIS_MODE_SIZES,
Some(
MeasurementMode::Simulation | MeasurementMode::Memory | MeasurementMode::Telemetry,
) => ANALYSIS_MODE_SIZES,
Some(MeasurementMode::Walltime) | None => WALLTIME_MODE_SIZES,
}
}
Expand Down
7 changes: 6 additions & 1 deletion crates/runner-shared/src/fifo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub const RUNNER_ACK_FIFO: &str = "/tmp/runner.ack.fifo";
/// of integrations supporting the new protocol version a significant amount of time before
/// releasing the runner.
pub const MINIMAL_SUPPORTED_PROTOCOL_VERSION: u64 = 1;
pub const CURRENT_PROTOCOL_VERSION: u64 = 2;
pub const CURRENT_PROTOCOL_VERSION: u64 = 3;

const _: () = assert!(
MINIMAL_SUPPORTED_PROTOCOL_VERSION <= CURRENT_PROTOCOL_VERSION,
Expand Down Expand Up @@ -63,4 +63,9 @@ pub enum Command {
SetVersion(u64),
GetIntegrationMode,
IntegrationModeResponse(IntegrationMode),
/// The offset the process adds to its monotonic clock to timestamp its OpenTelemetry data.
SetTelemetryMonotonicOffset {
pid: i32,
offset_ns: i64,
},
}
1 change: 1 addition & 0 deletions crates/runner-shared/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ pub mod metadata;
pub mod module_symbols;
pub mod perf_event;
pub mod runtime_env;
pub mod telemetry;
pub mod unwind_data;
pub mod walltime_results;
3 changes: 3 additions & 0 deletions crates/runner-shared/src/measurement_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ pub enum MeasurementMode {
Memory,
#[value(alias = "instrumentation")]
Simulation,
/// Runs the benchmarks without measuring them, to collect the telemetry they emit
Telemetry,
}

impl MeasurementMode {
Expand All @@ -19,6 +21,7 @@ impl MeasurementMode {
Self::Simulation => "instrumentation",
Self::Walltime => "walltime",
Self::Memory => "memory",
Self::Telemetry => "telemetry",
}
}
}
Loading
Loading