Skip to content

Instantly share code, notes, and snippets.

@jberkel
Created August 29, 2010 10:26
Show Gist options
  • Select an option

  • Save jberkel/556186 to your computer and use it in GitHub Desktop.

Select an option

Save jberkel/556186 to your computer and use it in GitHub Desktop.
hit = VSL_stats->cache_hit - copy.cache_hit;
miss = VSL_stats->cache_miss - copy.cache_miss;
hit /= lt;
miss /= lt;
if (hit + miss != 0) {
ratio = hit / (hit + miss);
myexp(&a1, ratio, &n1, 10);
myexp(&a2, ratio, &n2, 100);
myexp(&a3, ratio, &n3, 1000);
}
mvprintw(1, 0, "Hitrate ratio: %8u %8u %8u", n1, n2, n3);
mvprintw(2, 0, "Hitrate avg: %8.4f %8.4f %8.4f", a1, a2, a3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment