summaryrefslogtreecommitdiffstats
path: root/gstatsd/test.py
diff options
context:
space:
mode:
authorPatrick Hensley <spaceboy@indirect.com>2011-06-28 21:52:36 (GMT)
committerPatrick Hensley <spaceboy@indirect.com>2011-06-29 01:03:22 (GMT)
commit29bb10a1b743b90448c3bbfb456677e36b50f16e (patch)
tree7e6c7eafe3104bdcda3214ce902bfd5873f0a2cd /gstatsd/test.py
downloadgstatsd-29bb10a1b743b90448c3bbfb456677e36b50f16e.zip
gstatsd-29bb10a1b743b90448c3bbfb456677e36b50f16e.tar.gz
gstatsd-29bb10a1b743b90448c3bbfb456677e36b50f16e.tar.bz2
Initial release of gstatsd 0.1.
Diffstat (limited to 'gstatsd/test.py')
-rw-r--r--gstatsd/test.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/gstatsd/test.py b/gstatsd/test.py
new file mode 100644
index 0000000..824a323
--- /dev/null
+++ b/gstatsd/test.py
@@ -0,0 +1,22 @@
+
+from client import StatsClient
+
+
+def main():
+ cli = StatsClient()
+ for num in range(1, 11):
+ cli.timer('foo', num)
+ return
+ cli.increment('baz', 0.5)
+ cli.increment('baz', 0.5)
+ cli.timer('t3', 100, 0.5)
+ return
+
+ cli.increment('foo')
+ cli.counter(['foo', 'bar'], 2)
+ cli.timer('t1', 12)
+ cli.timer('t2', 30)
+
+if __name__ == '__main__':
+ main()
+