Medida
uniform_sample.h
00001 //
00002 // Copyright (c) 2012 Daniel Lundin
00003 //
00004 
00005 #ifndef MEDIDA_UNIFORM_SAMPLE_H_
00006 #define MEDIDA_UNIFORM_SAMPLE_H_
00007 
00008 #include <cstdint>
00009 #include <memory>
00010 
00011 #include "medida/stats/sample.h"
00012 #include "medida/stats/snapshot.h"
00013 
00014 namespace medida {
00015 namespace stats {
00016 
00017 class UniformSample : public Sample {
00018  public:
00019   UniformSample(std::uint32_t reservoirSize);
00020   ~UniformSample();
00021   virtual void Clear();
00022   virtual std::uint64_t size() const;
00023   virtual void Update(std::int64_t value);
00024   virtual Snapshot MakeSnapshot() const;
00025  private:
00026   class Impl;
00027   std::unique_ptr<Impl> impl_;
00028 };
00029 
00030 } // namespace stats
00031 } // namespace medida
00032 
00033 #endif // MEDIDA_UNIFORM_SAMPLE_H_
 All Classes