Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ debug_log() {
debug_log "Called with arguments: $*"
debug_log "Number of arguments: $#"


# Currently only walltime is supported
if [ "${CODSPEED_RUNNER_MODE:-}" != "walltime" ]; then
echo "CRITICAL: Go benchmarks can only be run with the walltime instrument"
exit 1
fi

# Find the real go binary, so that we don't end up in infinite recursion
REAL_GO=$(which -a go | grep -v "$(realpath "$0")" | head -1)
if [ -z "$REAL_GO" ]; then
Expand Down
1 change: 1 addition & 0 deletions src/run/runner/helpers/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pub mod env;
pub mod get_bench_command;
pub mod introspected_golang;
pub mod profile_folder;
pub mod run_command_with_log_pipe;
pub mod setup;
9 changes: 6 additions & 3 deletions src/run/runner/valgrind/measure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use crate::prelude::*;
use crate::run::runner::RunnerMode;
use crate::run::runner::helpers::env::get_base_injected_env;
use crate::run::runner::helpers::get_bench_command::get_bench_command;
use crate::run::runner::helpers::introspected_golang;
use crate::run::runner::helpers::run_command_with_log_pipe::run_command_with_log_pipe;
use crate::run::runner::valgrind::helpers::ignored_objects_path::get_objects_path_to_ignore;
use crate::run::runner::valgrind::helpers::introspected_nodejs::setup_introspected_nodejs;
Expand Down Expand Up @@ -90,11 +91,13 @@ pub async fn measure(
.env(
"PATH",
format!(
"{}:{}",
"{}:{}:{}",
setup_introspected_nodejs()
.map_err(|e| anyhow!("failed to setup NodeJS introspection. {}", e))?
.to_str()
.unwrap(),
.to_string_lossy(),
introspected_golang::setup_introspected_go()
.map_err(|e| anyhow!("failed to setup Go introspection. {}", e))?
.to_string_lossy(),
env::var("PATH").unwrap_or_default(),
),
);
Expand Down
2 changes: 1 addition & 1 deletion src/run/runner/wall_time/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use crate::run::instruments::mongo_tracer::MongoTracer;
use crate::run::runner::executor::Executor;
use crate::run::runner::helpers::env::{get_base_injected_env, is_codspeed_debug_enabled};
use crate::run::runner::helpers::get_bench_command::get_bench_command;
use crate::run::runner::helpers::introspected_golang::setup_introspected_go;
use crate::run::runner::helpers::run_command_with_log_pipe::run_command_with_log_pipe;
use crate::run::runner::wall_time::introspected_golang::setup_introspected_go;
use crate::run::runner::{ExecutorName, RunData};
use crate::run::{check_system::SystemInfo, config::Config};
use async_trait::async_trait;
Expand Down
1 change: 0 additions & 1 deletion src/run/runner/wall_time/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pub mod executor;
pub mod introspected_golang;
pub mod perf;