aboutsummaryrefslogtreecommitdiff
path: root/analysis/vis.livemd
diff options
context:
space:
mode:
authorAria Shrimpton <me@aria.rip>2024-03-01 13:41:01 +0000
committerAria Shrimpton <me@aria.rip>2024-03-01 13:41:01 +0000
commit2f34cf8301e8d43840e7f26921cdd4e78a4ca6b0 (patch)
tree58ca6b4ee6ca7ca9ec2c9cd98d7c20f2ea41e0a3 /analysis/vis.livemd
parent9adbfb5c3051a5a0a3377c6c1bf2331ab9009f02 (diff)
analyse latest data
Diffstat (limited to 'analysis/vis.livemd')
-rw-r--r--analysis/vis.livemd55
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} -->