Skip to content

Instantly share code, notes, and snippets.

@autoletics
Created January 29, 2017 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save autoletics/47773bdda44a1b35eccabc63c12ab2ba to your computer and use it in GitHub Desktop.
Save autoletics/47773bdda44a1b35eccabc63c12ab2ba to your computer and use it in GitHub Desktop.
static void print(ChangeSet cset) {
// for each probe (method) executed within the metered window
for (Iterator<ChangePoint> cps = cset.changepoints(); cps.hasNext(); ) {
ChangePoint cp = cps.next();
// for each meter (clock time) measured within the metered window
for (Iterator<Change> cs = cp.changes(); cs.hasNext(); ) {
Change c = cs.next();
// meter, total, self total, count, probe name
out.format("%s %6d %6d %2d %s\n",
c.getName(),
c.getTotal(),
c.getInherentTotal(),
c.getCount(),
cp.getName());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment