summaryrefslogtreecommitdiffstats
path: root/grapher/GraphData.hxx
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-11-03 16:22:36 -0500
committerDave Brolley <brolley@redhat.com>2009-11-03 16:22:36 -0500
commit899b66209b0146560f0efc33efe58a4be3577df3 (patch)
tree7b64764b917c359a99d0adcf6c68a2d73cd52be7 /grapher/GraphData.hxx
parentd4ad7984018ff769cbb662342be7e501632c0bea (diff)
parent89651893a8ec51ee4d77ddfd57019e350ad7b169 (diff)
downloadsystemtap-steved-899b66209b0146560f0efc33efe58a4be3577df3.tar.gz
systemtap-steved-899b66209b0146560f0efc33efe58a4be3577df3.tar.xz
systemtap-steved-899b66209b0146560f0efc33efe58a4be3577df3.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Conflicts: Makefile.in configure doc/Makefile.in doc/SystemTap_Tapset_Reference/Makefile.in grapher/Makefile.in testsuite/configure
Diffstat (limited to 'grapher/GraphData.hxx')
-rw-r--r--grapher/GraphData.hxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/grapher/GraphData.hxx b/grapher/GraphData.hxx
index e4c08cfd..0e26fb4d 100644
--- a/grapher/GraphData.hxx
+++ b/grapher/GraphData.hxx
@@ -6,6 +6,8 @@
#include <vector>
#include <tr1/memory>
+#include <boost/circular_buffer.hpp>
+
namespace systemtap
{
struct GraphDataBase
@@ -16,11 +18,12 @@ namespace systemtap
DOT,
EVENT
};
- GraphDataBase() : scale(1.0), style(BAR)
+ typedef boost::circular_buffer<double> TimeList;
+ GraphDataBase(TimeList::capacity_type cap = 50000)
+ : scale(1.0), style(BAR), times(cap)
{
color[0] = 0.0; color[1] = 1.0; color[2] = 0.0;
}
- typedef std::vector<double> TimeList;
// size of grid square at "normal" viewing
double scale;
double color[3];
@@ -36,7 +39,11 @@ namespace systemtap
{
public:
typedef T data_type;
- typedef std::vector<data_type> DataList;
+ typedef boost::circular_buffer<data_type> DataList;
+ GraphData(typename DataList::capacity_type cap = 50000)
+ : GraphDataBase(cap), data(cap)
+ {
+ }
DataList data;
};
struct CSVData