Line | |
---|
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 | if (activate) { |
---|
21 | cout << dec << endl << |
---|
22 | "Report : " << endl << |
---|
23 | "L1 total requests : " << l1hits + l1misses << endl << |
---|
24 | " hits : " << l1hits << endl << |
---|
25 | " misses : " << l1misses << endl; |
---|
26 | } |
---|
27 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.