1 
2 /* Web Polygraph       http://www.web-polygraph.org/
3  * Copyright 2003-2011 The Measurement Factory
4  * Licensed under the Apache License, Version 2.0 */
5 
6 #ifndef POLYGRAPH__LOGANALYZERS_LOADTRACEFIG_H
7 #define POLYGRAPH__LOGANALYZERS_LOADTRACEFIG_H
8 
9 #include "xstd/String.h"
10 #include "loganalyzers/ReportTraceFigure.h"
11 
12 class LoadStex;
13 class PhaseInfo;
14 class PhaseTrace;
15 class StatIntvlRec;
16 
17 // creates load trace figure based on interval load stats
18 class LoadTraceFig: public ReportTraceFigure {
19 	public:
20 		typedef LoadStex Stex;
21 
22 	public:
23 		LoadTraceFig();
24 
25 		void stats(const Stex *aStex, const PhaseInfo *phase);
26 		void compareWith(const Stex *stex);
27 
28 	protected:
29 		virtual int addPlotData();
30 
31 		enum lineType { lnRate, lnBwidth };
32 		int dumpDataLines(const LoadStex *stex, const lineType lt);
33 		int dumpDataLine(const LoadStex *stex, Time stamp, const StatIntvlRec &r, const lineType lt);
34 
35 	protected:
36 		const Stex *theStex;
37 		Array<const Stex *> theComparison; // theStex and others
38 		const PhaseInfo *thePhase;
39 		const PhaseTrace *theTrace;
40 };
41 
42 #endif
43