source:
trunk/monitor.cpp
@
3
| Last change on this file since 3 was 2, checked in by , 16 years ago | |
|---|---|
| File size: 473 bytes | |
| Rev | Line | |
|---|---|---|
| [2] | 1 | #include "monitor.h" |
| 2 | #include <iostream> | |
| 3 | ||
| 4 | using namespace std; | |
| 5 | ||
| 6 | void Monitor::count_hit() | |
| 7 | { | |
| 8 | if (l1hit_signal) | |
| 9 | l1hits++; | |
| 10 | } | |
| 11 | ||
| 12 | void Monitor::count_miss() | |
| 13 | { | |
| 14 | if (l1miss_signal) | |
| 15 | l1misses++; | |
| 16 | } | |
| 17 | ||
| 18 | void Monitor::make_my_report() | |
| 19 | { | |
| 20 | cout << dec << endl << | |
| 21 | "Report : " << endl << | |
| 22 | "L1 total requests : " << l1hits + l1misses << endl << | |
| 23 | " hits : " << l1hits << endl << | |
| 24 | " misses : " << l1misses << endl; | |
| 25 | ||
| 26 | } |
Note: See TracBrowser
for help on using the repository browser.
![(please configure the [header_logo] section in trac.ini)](/trac/speedsimu/chrome/site/your_project_logo.png)