• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ben-manes / caffeine / #2520
100%

Build:
DEFAULT BRANCH: master
Ran 15 Nov 2020 04:02AM UTC
Jobs 1
Files 77
Run time 7s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
#2520

push

other

ben-manes
Allow for simulator policies to add custom metrics

In addition to the common policy statistics, like the hit rate, there
may be a desire to track algorithm-specific metrics. For example a
Clock policy will perform an O(n) scan on eviction to unmark hot
entries as it searches for a cold entry to evict. It might be useful
to capture the worst case run length observed for a given trace.

A policy can extend the PolicyStats to register and track new metrics,
and the reporter will capture them in its output. For efficiency the
metric are registered by a supplier, rather updating a mapping to the
value itself. This avoids a high rate of object churn if modified on
every access event (which may be millions). Instead the metric should
be kept as a primitive instance field and the accessor method
registered.

If a metric is not captured by a policy then the reporters print
an empty result. If nothing was captured across all policies, then
the metric is dropped from the report to reduce visual noise. This
also includes metrics that are tagged by a feature characteristic
which was not employed by the trace (such as entry weights).

6228 of 6681 relevant lines covered (93.22%)

0.93 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #2520.1 15 Nov 2020 04:02AM UTC 0
93.22
Source Files on build #2520
Detailed source file information is not available for this build.
  • Back to Repo
  • cdd455fc on github
  • Prev Build on master
  • Next Build on master
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc