Skip to content

Commit 59f8990

Browse files
committed
Repeats
1 parent 663dc2e commit 59f8990

File tree

3 files changed

+256
-48
lines changed

3 files changed

+256
-48
lines changed

timing/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ Run from `build/`:
2424
```bash
2525
./timing/timeBayesTreeCovariance \
2626
--datasets w100.graph,w10000.graph,w20000.txt \
27+
--repeats 10 \
2728
--output-dir ../timing/results/bayes_tree_covariance
2829
```
2930

3031
This writes:
3132

3233
- `timing/results/bayes_tree_covariance/raw.csv`
34+
- `timing/results/bayes_tree_covariance/per_query.csv`
3335
- `timing/results/bayes_tree_covariance/summary.csv`
3436

3537
The generated CSVs now include the small-query families used to benchmark the
@@ -80,6 +82,14 @@ This generates:
8082

8183
- The benchmark timings measure covariance-query work after optimization and
8284
linearization.
85+
- Each distinct query is run once as an untimed warmup and then `--repeats`
86+
times as measured repetitions.
87+
- `raw.csv` stores one row per measured repetition.
88+
- `per_query.csv` stores one row per distinct query, aggregating repeated
89+
timings by per-query means.
90+
- `summary.csv` stores one row per query family bucket, aggregating the
91+
per-query means and structural statistics by medians across the sampled
92+
queries.
8393
- The `results-smallq.pdf` figure summarizes the `Q = 1` and `Q = 2` query
8494
families; the larger performance figures focus on `Q > 2`, where Steiner
8595
localization changes the asymptotic behavior.

timing/plot_bayes_tree_covariance.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
See LICENSE for the license information
88
99
Generate paper-ready plots for the Bayes-tree covariance benchmarks.
10-
Author: Frank Dellaert
10+
Author: Codex 5.4, prompted by Frank Dellaert
1111
"""
1212

1313
import argparse
@@ -35,9 +35,10 @@ def to_float(rows, fields):
3535
row[field] = float(row[field])
3636
row["query_size"] = int(row["query_size"])
3737
row["queries"] = int(row["queries"])
38-
row["support_cliques"] = int(row["support_cliques"])
39-
row["compressed_cliques"] = int(row["compressed_cliques"])
40-
row["reduced_state_dim"] = int(row["reduced_state_dim"])
38+
row["repeats"] = int(row["repeats"])
39+
row["support_cliques"] = float(row["support_cliques"])
40+
row["compressed_cliques"] = float(row["compressed_cliques"])
41+
row["reduced_state_dim"] = float(row["reduced_state_dim"])
4142
return rows
4243

4344

@@ -224,7 +225,7 @@ def plot_small_queries(rows, output_path):
224225
"w20000\nMETIS",
225226
],
226227
)
227-
ax.set_ylabel("Median query time (ms)")
228+
ax.set_ylabel("Median per-query mean time (ms)")
228229
ax.set_yscale("log")
229230
ax.grid(True, axis="y", alpha=0.3)
230231
handles, labels = axes[0].get_legend_handles_labels()
@@ -301,7 +302,7 @@ def plot_ordering(rows, output_path):
301302
ax.set_title(dataset_label(dataset))
302303
ax.set_xlabel("Local-window query size")
303304
ax.set_xticks(query_sizes, [str(size) for size in query_sizes])
304-
ax.set_ylabel("Median query time (ms)")
305+
ax.set_ylabel("Median per-query mean time (ms)")
305306
ax.set_yscale("log")
306307
ax.grid(True, axis="y", alpha=0.3)
307308
handles, labels = axes[0].get_legend_handles_labels()
@@ -349,7 +350,7 @@ def plot_structure(rows, output_path):
349350
)
350351
ax.set_title(dataset_label(dataset))
351352
ax.set_xlabel("Query size")
352-
ax.set_ylabel("Count / dimension")
353+
ax.set_ylabel("Median count / dimension")
353354
ax.grid(True, alpha=0.3)
354355
handles, labels = axes[0].get_legend_handles_labels()
355356
figure.legend(handles, labels, loc="upper center", ncol=3, frameon=False)
@@ -767,9 +768,12 @@ def main():
767768
load_rows(input_path),
768769
[
769770
"median_total_ms",
770-
"total_total_ms",
771+
"sum_query_mean_total_ms",
771772
"median_reduction_ms",
772773
"median_extraction_ms",
774+
"support_cliques",
775+
"compressed_cliques",
776+
"reduced_state_dim",
773777
],
774778
)
775779
)

0 commit comments

Comments
 (0)