epiverse-trace / epichains

Methods for simulating and analysing the sizes and lengths of infectious disease transmission chains from branching process models
https://epiverse-trace.github.io/epichains/
Other
6 stars 2 forks source link

Not for merge - benchmark `summary(<epichains_tree>)` vs `simulate_summary()` #212

Closed jamesmbaazam closed 5 months ago

jamesmbaazam commented 7 months ago

This PR sets up a benchmark of two workflows that currently exist in the package for obtaining chain summaries:

  1. Run summary(<epichains_tree>), where <epichains_tree> is obtained from a run of simulate_chains().
  2. Run simulate_summary() with the same parameters passed to simulate_chains().

The benchmarks will help us decide on whether to keep or delete simulate_summary() as it is currently duplicated code that might become a maintenance burden.

codecov-commenter commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.78%. Comparing base (5e6fd49) to head (38e67ac).

:exclamation: Current head 38e67ac differs from pull request most recent head 64d9948. Consider uploading reports for the commit 64d9948 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #212 +/- ## ======================================= Coverage 98.78% 98.78% ======================================= Files 8 8 Lines 574 574 ======================================= Hits 567 567 Misses 7 7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jamesmbaazam commented 7 months ago

@sbfnk The benchmark reveals that simulate_summary() is faster. I don't think that there is a massive difference though.

summary_benchmarks

jamesmbaazam commented 5 months ago

Closing this PR as stale. Will reopen in the discussion about removing simulate_chain_stats() becomes active again.