summaryrefslogtreecommitdiff
path: root/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
commitb8a284439c00e81c21307f651c71f8256ae725f9 (patch)
treedcd1a247483fb99df4c72dc78ae5a29e5e74e454 /cpp/src/tests/Statistics.h
parenta41bff40eb9080aa99a06b5325d47d995079d5a0 (diff)
downloadqpid-python-b8a284439c00e81c21307f651c71f8256ae725f9.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/qpid@933718 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/Statistics.h')
-rw-r--r--cpp/src/tests/Statistics.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/cpp/src/tests/Statistics.h b/cpp/src/tests/Statistics.h
index def37b7424..90bdbb6819 100644
--- a/cpp/src/tests/Statistics.h
+++ b/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);
}