/* Web Polygraph http://www.web-polygraph.org/ * (C) 2003-2006 The Measurement Factory * Licensed under the Apache License, Version 2.0 */ #ifndef POLYGRAPH__LOGANALYZERS_HISTSTEX_H #define POLYGRAPH__LOGANALYZERS_HISTSTEX_H #include "xstd/String.h" #include "xstd/gadgets.h" #include "loganalyzers/PhaseInfo.h" #include "loganalyzers/StexBase.h" // an algorithm of extracting a single value statistics out of // interval stats record class HistStex: public StexBase { public: HistStex(const String &aKey, const String &aName, const String &aUnit): StexBase(aKey, aName, aUnit) {} virtual bool valueKnown(const PhaseInfo &phase) const { return value(phase)->known(); } virtual const Histogram *value(const PhaseInfo &phase) const = 0; }; class PipelineDepthHistStex: public HistStex { public: PipelineDepthHistStex(): HistStex("pdepths", "pipeline depth", "xact") {} virtual const Histogram *value(const PhaseInfo &phase) const { return &phase.stats().theConnPipelineDepths; } }; #endif