| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
StatsClientBase and PipelineBase are not intended to be public APIs, and
the syntax for metaclasses introduces some complexity between Python 2
and 3.
Since ABCMeta and abc.abstractmethod were only being used to guarantee
that internal subclasses implemented these methods correctly, and
there's no external behavioral issues on Python 3, where the metaclass
has been ignored for years, let's remove the metaclass and rely on
NotImplementedError() and the test suite as a backstop.
Fixes #106.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since early June[1], IPv6 loopback address resolution has been flaky on
TravisCI. It seems that it should have been flaky even earlier, or
there's something strange going on. For now, skip the test. We can come
back to diagnosing once master is (otherwise) passing.
This failure first started on Python 2.6, but quickly spread to all
versions. It appears to pass occasionally, but not on any consistent
version. Lately it seems to fail more or less all the time, though on
the latest cron build, it did pass on Pypy[2].
[1]: https://travis-ci.org/jsocol/pystatsd/builds/387167216
[2]: https://travis-ci.org/jsocol/pystatsd/builds/417687774
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
kwargs
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When Python's standard library is patched with Eventlet the exception
raised when two threads access the same socket simultaneously is
RuntimeError and I think it makes sense to include it here.
The downside is it may start ignoring too wide variety of exceptions but
on the other hand I can't think of any other RuntimeErrors that can be
raised here.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This section of code is going to be pretty hot; it's best to optimize it as much as possible.
It might be worth it to switch to a list for the data variable as well, and use '\n'.join(data) (vs. string concatenation).
From: https://docs.python.org/2/library/collections.html#collections.deque
"Though list objects support similar operations, they are optimized for fast fixed-length operations and incur O(n) memory movement costs for pop(0) and insert(0, v) operations which change both the size and position of the underlying data representation."
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
- For negative absolute gauge values, zero out the gauge first, since
StatsD can't distinguish it from a delta.
- Add tests.
- Patch via Ben Gilbert (https://github.com/bgilbert)
- Fixes #40.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Small refactor to StatsClient
|
| | |
|
|/
|
|
|
|
|
|
|
| |
allows to control the maximum udp packet size. when pipelining a lot
of metrics within a controlled network or to 127.0.0.1 it can be desirable
to lower the number of udp packets by sending larger onces.
the documentation reflects that this option is not for the faint hearted,
should not be used on the internet and should be handled with extreme care.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 3c4ec687273416b355c20282e33249d87cd84b52.
Given graphite's support for wildcards anywhere in the chain, this is an
unnecessary complication. The same thing can be achieved with the
prefix, e.g.:
>>> import socket;
>>> host, _, _ = socket.gethostname().partition('.')
>>> prefix = 'my_app.' + host
>>> client = StatsClient(prefix=prefix)
Stats can be accessed in aggregate as 'stats.my_app.*.whatever.stat'.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Added a statsd suffix that works just like the prefix, but appends to the metric's key instead
Added tests
Updated documentation
|
|\ \ |
|
| | | |
|
| | | |
|
| | | |
|