swift/test/unit
Samuel Merritt 4cf96b3791 Honor sample_rate in StatsD logging.
It's there to let administrators turn down the barrage of stats data
that StatsD must cope with, but it wasn't actually honored. Worse, if
the sample rate was set to e.g. 0.2, the stats would all be multiplied
by its inverse, e.g. 2. This patch actually drops packets when
sample_rate < 1, so you get correct measurements.

Fortunately, the default sample rate is 1 (i.e. drop nothing), and
multiplying by 1/1 doesn't change anything, so stats with the default
sample rate of 1.0 are, and have been, just fine.

Fixes bug 1065643.

Also, make the two touched files compliant with pep8 v1.3.3.

Change-Id: I66663144009ae4c9ee96f6a111745d8f5d2f5ca3
2012-10-12 12:38:33 -07:00
..
account local WSGI Request and Response classes 2012-09-28 14:48:48 -07:00
common Honor sample_rate in StatsD logging. 2012-10-12 12:38:33 -07:00
container local WSGI Request and Response classes 2012-09-28 14:48:48 -07:00
obj internal client unicode paths 2012-10-05 18:57:24 +00:00
proxy Allows removal of ACLs 2012-10-11 10:16:35 +11:00
__init__.py Merge "make obj replicator locking more optimistic" 2012-08-23 22:06:35 +00:00