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 #include "base/polygraph.h"
7 
8 #include <fstream>
9 
10 #include "xstd/gadgets.h"
11 #include "loganalyzers/ReportTraceFigure.h"
12 
13 
ReportTraceFigure()14 ReportTraceFigure::ReportTraceFigure() {
15 	theAxisX1.label("minutes");
16 }
17 
globalStart(Time aStart)18 void ReportTraceFigure::globalStart(Time aStart) {
19 	theGlobalStart = aStart;
20 }
21 
22 // use gnuplot date axis?
addDataPoint(const Time stamp,const double y)23 void ReportTraceFigure::addDataPoint(const Time stamp, const double y) {
24 	static bool complained = false;
25 	complained = complained || !Should(theGlobalStart >= 0);
26 	const double x = Max(0.0, (stamp - theGlobalStart).secd()/60);
27 	ReportFigure::addDataPoint(x, y);
28 }
29