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
20 changes: 20 additions & 0 deletions comparison/generate-delta.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,24 @@ deltas |> group_by(algo) |> group_walk(function(data, key) {
})
})

overview = deltas |>
filter(bench == "tiny_data") |>
group_by(algo, fn_name, arch) |>
summarize(
min = min(factor.time),
max = max(factor.time)
)|>
rename(algorithm = algo, entrypoint = fn_name) |>
mutate(
algorithm = str_glue("`{algorithm}`"),
entrypoint = str_glue("`{entrypoint}`"),
arch = str_glue("`{arch}`"),
min = percent(min, accuracy = 1),
max = percent(max, accuracy = 1)
) |>
kable()

message("An overview of changes for the tiny_data benchmark:")
print(overview)

warnings()
5 changes: 3 additions & 2 deletions comparison/harness/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ mod capture {
use crate::{
CaptureArgs, Error, clean,
git::{self, Cache},
paths::Paths,
paths::{self, Paths},
};

pub fn main(args: CaptureArgs) -> Result<(), Error> {
Expand Down Expand Up @@ -300,7 +300,8 @@ mod capture {

let mut c = Command::new("cargo");

c.env("RUSTUP_TOOLCHAIN", "stable")
c.current_dir(paths::comparison_dir())
.env("RUSTUP_TOOLCHAIN", "stable")
.arg("criterion")
.args(["-p", "comparison"])
.arg("--message-format=json");
Expand Down
9 changes: 9 additions & 0 deletions comparison/shared.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ load_single_trial = function(filename) {
massage_data()
}

trials_from_tree_hash = function(tree_hash) {
data_path = fs::path("captures", tree_hash, "data")
data_path |>
list.dirs(full.names = F, recursive = F) |>
as.numeric() |>
sort() |>
map(\(n) fs::path(data_path, n, "clean.json"))
}

load_benchmark_trials = function(filenames) {
all_data = filenames |>
map(load_json_lines_as_tibble) |>
Expand Down
Loading