00001
00002
00003
00004
00005 #ifndef MEDIDA_METRICS_SNAPSHOT_H_
00006 #define MEDIDA_METRICS_SNAPSHOT_H_
00007
00008 #include <memory>
00009 #include <vector>
00010
00011 namespace medida {
00012 namespace stats {
00013
00014 class Snapshot {
00015 public:
00016 Snapshot(const std::vector<double>& values);
00017 ~Snapshot();
00018 std::size_t size() const;
00019 double getValue(double quantile) const;
00020 double getMedian() const;
00021 double get75thPercentile() const;
00022 double get95thPercentile() const;
00023 double get98thPercentile() const;
00024 double get99thPercentile() const;
00025 double get999thPercentile() const;
00026 std::vector<double> getValues() const;
00027 private:
00028 class Impl;
00029 Impl* impl_;
00030
00031 };
00032
00033
00034 }
00035 }
00036
00037 #endif // MEDIDA_METRICS_SNAPSHOT_H_