-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStats.h
32 lines (21 loc) · 1.04 KB
/
Stats.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <iostream>
#include <vector>
#include "Job.h"
using namespace std;
#ifndef STATS_H
#define STATS_H
class Stats
{
private:
vector<float> _percentHoleData; //used to store each hole calculation so an average can be computed at the end
public:
Stats() { }
void OutputMem(vector<char> memory); //call this function to print memory statistics
void MemMap(vector<char> memory); //prints memory map
void PercentHoles(vector<char> memory); //prints percentage of holes in memory map
void ProcessStates(vector<Job*> Jobs, int clockTime); //prints out information for each process
void logHolePercent(float percentHole); //called after every percent hole calculation to store the hole percentages
void getAvgHolePercent(); //call at the end of the main program to compute average for every process logged
float getAvgWaitTime(vector<Job*> Jobs); //call at the end of the main program to compute average for every process logged
};
#endif /* End STATS_H */