Skip to content

Commit 3706450

Browse files
committed
Add an R helper to get all the files for a hash
1 parent de230c6 commit 3706450

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎comparison/shared.R‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,15 @@ load_single_trial = function(filename) {
8888
massage_data()
8989
}
9090

91+
trials_from_tree_hash = function(tree_hash) {
92+
data_path = fs::path("captures", tree_hash, "data")
93+
data_path |>
94+
list.dirs(full.names = F, recursive = F) |>
95+
as.numeric() |>
96+
sort() |>
97+
map(\(n) fs::path(data_path, n, "clean.json"))
98+
}
99+
91100
load_benchmark_trials = function(filenames) {
92101
all_data = filenames |>
93102
map(load_json_lines_as_tibble) |>

0 commit comments

Comments
 (0)