Skip to content

Commit

Permalink
add print hit stat for each request
Browse files Browse the repository at this point in the history
  • Loading branch information
1a1a11a committed Jan 9, 2024
1 parent 6439066 commit 9a20b23
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libCacheSim/bin/cachesim/sim.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ void simulate(reader_t *reader, cache_t *cache, int report_interval,
req_cnt++;
req_byte += req->obj_size;
if (cache->get(cache, req) == false) {
printf("%lu miss\n", (unsigned long)req->obj_id);
miss_cnt++;
miss_byte += req->obj_size;
}
printf("%lu hit\n", (unsigned long)req->obj_id);
if (req->clock_time - last_report_ts >= report_interval &&
req->clock_time != 0) {
INFO(
Expand Down

0 comments on commit 9a20b23

Please sign in to comment.