Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support benchmarks using wall-time mode #14

Merged
merged 1 commit into from
Nov 23, 2023
Merged

Support benchmarks using wall-time mode #14

merged 1 commit into from
Nov 23, 2023

Conversation

aochagavia
Copy link
Collaborator

@aochagavia aochagavia commented Nov 22, 2023

See this comment for example output (from a run on the bare-metal server). The noise is incredibly low! If such low level of noise is consistent over time, we might not even need the icount benchmarks 🤔. By contrast, the previous comment shows results from a run on my laptop and are pretty noisy.

Relevant changes (pretty intertwined, so all in a single commit):

  • Track scenario_kind in bench_results table
  • Gather walltime results next to icount results
  • Report walltime results in the GH comment, after icount results
  • Push walltime results to bencher
  • Cache walltime results to database

Btw, I discovered a few more ansible issues, which I'll tackle in a separate PR. There is also an issue in the sorting of the diffs, unrelated to this PR, which I'll fix separately too.

Copy link
Member

@cpu cpu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple small comments. I think this looks good :-)

return None;
}
};
fn append_results_as_bmf(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be more of a style thing but I feel like my inclination would be to try and avoid passing in mutable state by having this function do the conversion of HashMap<String, f64>, MetricKind to BMF and return JsonMetricsMap, leaving pushing the BMF into the JsonResultsMap to the callers. Is there a reason to avoid that I'm overlooking?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, looks like I fell into the trap of premature optimization here

Comment on lines +21 to +22
icount_scenarios_missing_in_baseline TEXT,
walltime_scenarios_missing_in_baseline TEXT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in this file feel like a case where we should be using the migration support to apply a delta over the pre-existing 0_create.sql. I think with this approach we'd have to drop the production database and recreate it from scratch right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have a production database yet, so I think we can get away with this. Or is there a different reason why this might be a problem after all?

By the way, SQLx will raise a fatal error if a migration was modified after it was applied (nice to know SQLx has our back and will prevent accidents even if we mess things up).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have a production database yet, so I think we can get away with this. Or is there a different reason why this might be a problem after all?

Nope, I think I just tricked myself into thinking there was an instance on the dedicated server already and so it made sense to treat this as a migration layered on top 😅

By the way, SQLx will raise a fatal error if a migration was modified after it was applied (nice to know SQLx has our back and will prevent accidents even if we mess things up).

Oh great 👍 That does help alleviate my concern here.

ci-bench-runner/templates/macros.md Outdated Show resolved Hide resolved
@aochagavia aochagavia merged commit 7fd5db5 into main Nov 23, 2023
9 checks passed
@aochagavia aochagavia deleted the walltime branch November 23, 2023 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants