4 Commits

Author SHA1 Message Date
Joseph Davis
623a4db21f Enable unit tests for py36
Even though there was a py36 test enabled in the gate, the tox.ini
configuration was not actually invoking the unit tests.  This
change sets up the environment to allow tests to run.

As a result, a number of Python3 errors are uncovered and fixed.

Notably:
  Python 3 does not have contextlib.nested, so reformatting using ,
  file() is not in Python 3, so use io.open() instead
  Use six.assertCountEqual(self, in tests

safe_decode:
  subprocess.check_output returns in byte encoding, while default text
type str. safe_decode does the right thing by making sure string are not
bytes in python2 and python3

No ascci encoding:
 python3 defaults to UTF-8 encoding, which is merely an extension to
ascii (default for python2).

test_json_plugin.py:
 the file being opened in binary(wb) mode so python is expecting the
string in bytes.

Some of the refactoring should be revisited after we drop Python 2
support.

Change-Id: I62b46a2509c39201ca015ca7c269b2ea70c376c8
Story: 2005047
Task: 29547
2019-07-18 16:08:09 +02:00
Jui Chandwaskar
c983708637 Add Apache License
Added Apache 2.0 License for missed files

Change-Id: I72217d3cf0089434a9bbe1e5dfd57224a803704e
Signed-off-by: Jui Chandwaskar <jchandwaskar@op5.com>
2018-04-14 11:50:07 +00:00
Joachim Barheine
170c3e45e8 Partial support for DogStatsd extensions
* Support tags
* Support timer (provisional by mapping metric type 'ms' to 'gauge')
* Support histograms (same)
* Support service-checks (by mapping status to gauge)
* Fix calculation of counters for sporadic metrics and sample-rates < 1

Story: 2000951
Task: 4079
Task: 3944
Change-Id: Ib4996b88a2845bceda9c803a386b76b2e0ae125a
2017-03-28 08:40:00 +00:00
Joe Keen
b80f070c57 Adding unit tests
Adding unit tests for metric types.

Fixing bug in log message.

Change-Id: I66e4279dfaad2f67d80b46a7eaf594f93c35d62f
Depends-On: Ibcf73b5ac661f4c0575f2dfb7d2d973d3c006fe2
2016-08-09 15:13:20 -06:00