Medida
collectd_reporter.h
00001 //
00002 // Copyright (c) 2012 Daniel Lundin
00003 //
00004 
00005 #ifndef MEDIDA_REPORTING_COLLECTD_REPORTER_H_
00006 #define MEDIDA_REPORTING_COLLECTD_REPORTER_H_
00007 
00008 #include <cstdint>
00009 #include <memory>
00010 #include <string>
00011 
00012 #include "medida/metrics_registry.h"
00013 #include "medida/metric_processor.h"
00014 #include "medida/reporting/abstract_polling_reporter.h"
00015 
00016 namespace medida {
00017 namespace reporting {
00018 
00019 
00020 class CollectdReporter : public AbstractPollingReporter, MetricProcessor {
00021  public:
00022   CollectdReporter(MetricsRegistry &registry, const std::string& hostname = "127.0.0.1", std::uint16_t port = 25826);
00023   virtual ~CollectdReporter();
00024   virtual void Run();
00025   virtual void Process(Counter& counter);
00026   virtual void Process(Meter& meter);
00027   virtual void Process(Histogram& histogram);
00028   virtual void Process(Timer& timer);
00029  private:
00030   class Impl;
00031   std::unique_ptr<Impl> impl_;
00032 };
00033 
00034 
00035 } // namespace reporting
00036 } // namespace medida
00037 
00038 #endif // MEDIDA_REPORTING_COLLECTD_REPORTER_H_
 All Classes