RTBKit  0.9
Open-source framework to create real-time ad bidding systems.
soa/service/testing/statsd_connector_test.cc
00001 /* statsd_connector_test.cc
00002    Jeremy Barnes, 3 August 2011
00003    Copyright (c) 2011 Datacratic.  All rights reserved.
00004 
00005    Test for the statsd connector.
00006 */
00007 
00008 #define BOOST_TEST_MAIN
00009 #define BOOST_TEST_DYN_LINK
00010 
00011 #include <boost/test/unit_test.hpp>
00012 #include "soa/service/statsd_connector.h"
00013 
00014 
00015 using namespace std;
00016 using namespace Datacratic;
00017 
00018 
00019 BOOST_AUTO_TEST_CASE( test_statsd_connector )
00020 {
00021     StatsdConnector x("127.0.0.1:4567");
00022     for(int i=0; i<30; i++) x.incrementCounter("test", 0.1);
00023     for(int i=0; i<300; i++) x.recordGauge("testGauge", 0.1, 5.2);
00024     BOOST_CHECK_EQUAL(2, 2);
00025 }
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator