diff options
Diffstat (limited to 'analysis/vis.livemd')
-rw-r--r-- | analysis/vis.livemd | 55 |
1 files changed, 33 insertions, 22 deletions
diff --git a/analysis/vis.livemd b/analysis/vis.livemd index 08d6371..30401ca 100644 --- a/analysis/vis.livemd +++ b/analysis/vis.livemd @@ -16,7 +16,7 @@ Mix.install([ require Explorer.DataFrame alias Explorer.DataFrame, as: DF alias Explorer.Series, as: SE -job_id = "1146" +job_id = "1147" job_dir = Path.expand(~c"./" ++ job_id) |> Path.absname() sections_dir = Path.join(job_dir, "sections") criterion_dir = Path.join(job_dir, "criterion") @@ -176,12 +176,11 @@ projs = benchmarks["bench_id"] |> SE.split("-") |> SE.transform(&hd/1) + |> SE.split("/") + |> SE.transform(&hd/1) benchmarks = DF.put(benchmarks, "proj", projs) -# TODO: consistently name rest of benchmarks -projs = SE.mask(projs, SE.contains(projs, "example")) - cost_estimates = SE.transform(projs |> SE.distinct(), fn proj_name -> [_, table | _] = @@ -201,7 +200,12 @@ cost_estimates = impl: impl |> String.replace("\\_", "_"), - cost: String.to_float(cost) + cost: + if String.contains?(cost, ".") do + String.to_float(cost) + else + String.to_integer(cost) + end } end) end) @@ -252,23 +256,30 @@ sorted_results = |> DF.group_by(["bench_id"]) |> DF.sort_by(mean) -sorted_estimates -|> DF.to_rows_stream() -|> Enum.map(fn %{"bench_id" => bench_id, "using" => using} -> - %{ - bench_id: bench_id, - using: using, - pos_estimate: - DF.filter(sorted_estimates, bench_id == ^bench_id)["using"] - |> SE.to_list() - |> Enum.find_index(fn u -> u == using end), - pos_results: - DF.filter(sorted_results, bench_id == ^bench_id)["using"] - |> SE.to_list() - |> Enum.find_index(fn u -> u == using end) - } -end) -|> DF.new() +position_comparison = + sorted_estimates + |> DF.to_rows_stream() + |> Enum.map(fn %{"bench_id" => bench_id, "using" => using} -> + %{ + bench_id: bench_id, + using: using, + pos_estimate: + DF.filter(sorted_estimates, bench_id == ^bench_id)["using"] + |> SE.to_list() + |> Enum.find_index(fn u -> u == using end), + pos_results: + DF.filter(sorted_results, bench_id == ^bench_id)["using"] + |> SE.to_list() + |> Enum.find_index(fn u -> u == using end) + } + end) + |> DF.new() +``` + +```elixir +position_comparison +|> DF.filter(pos_estimate != pos_results) +|> DF.collect() ``` <!-- livebook:{"reevaluate_automatically":true} --> |