summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/Statistics.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-04-13 17:43:02 +0000
committerAlan Conway <aconway@apache.org>2010-04-13 17:43:02 +0000
commitaae820278915bedf57ce4881caf9e29afe186d32 (patch)
treeec1a3badd9c5e94127a85b62c8135720517f1621 /qpid/cpp/src/tests/Statistics.h
parent25383ed754eea098c0e8da643cfb5e104a2e0bb9 (diff)
downloadqpid-python-aae820278915bedf57ce4881caf9e29afe186d32.tar.gz
Make qpid_send/qpid_receive output more spreadsheet-friendly.
- output is tab separated - --report-header=no suppresses headers git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@933718 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/Statistics.h')
-rw-r--r--qpid/cpp/src/tests/Statistics.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/qpid/cpp/src/tests/Statistics.h b/qpid/cpp/src/tests/Statistics.h
index def37b7424..90bdbb6819 100644
--- a/qpid/cpp/src/tests/Statistics.h
+++ b/qpid/cpp/src/tests/Statistics.h
@@ -82,7 +82,7 @@ class ReporterBase {
void report();
protected:
- ReporterBase(std::ostream& o, int batchSize);
+ ReporterBase(std::ostream& o, int batchSize, bool wantHeader);
virtual std::auto_ptr<Statistic> create() = 0;
private:
@@ -90,15 +90,16 @@ class ReporterBase {
void report(const Statistic& s);
std::auto_ptr<Statistic> overall;
std::auto_ptr<Statistic> batch;
- bool wantOverall;
- int wantBatch, batchCount;
+ int batchSize, batchCount;
bool stopped, headerPrinted;
std::ostream& out;
};
template <class Stats> class Reporter : public ReporterBase {
public:
- Reporter(std::ostream& o, int batchSize) : ReporterBase(o, batchSize) {}
+ Reporter(std::ostream& o, int batchSize, bool wantHeader)
+ : ReporterBase(o, batchSize, wantHeader) {}
+
virtual std::auto_ptr<Statistic> create() {
return std::auto_ptr<Statistic>(new Stats);
}