Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into create_metric_early
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr1212 committed Apr 27, 2020
2 parents b9dbd1b + 42c1242 commit 9653e7a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
17 changes: 17 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
3 changes: 2 additions & 1 deletion lib/carbon/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,8 @@ def _sendDatapointsNow(self, datapoints):
value = ("%.10f" % datapoint[1]).rstrip('0').rstrip('.')
else:
value = "%d" % datapoint[1]
self.sendLine("%s %s %d" % (metric, value, datapoint[0]))
to_send = "%s %s %d" % (metric, value, datapoint[0])
self.sendLine(to_send.encode('utf-8'))


class CarbonLineClientFactory(CarbonClientFactory):
Expand Down
10 changes: 5 additions & 5 deletions lib/carbon/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ def setUp(self):

def test_send_datapoints(self):
calls = [
(('foo.bar', (1000000000, 1.0)), "foo.bar 1 1000000000"),
(('foo.bar', (1000000000, 1.1)), "foo.bar 1.1 1000000000"),
(('foo.bar', (1000000000, 1.123456789123)), "foo.bar 1.1234567891 1000000000"),
(('foo.bar', (1000000000, 1)), "foo.bar 1 1000000000"),
(('foo.bar', (1000000000, 1.498566361088E12)), "foo.bar 1498566361088 1000000000"),
(('foo.bar', (1000000000, 1.0)), b'foo.bar 1 1000000000'),
(('foo.bar', (1000000000, 1.1)), b'foo.bar 1.1 1000000000'),
(('foo.bar', (1000000000, 1.123456789123)), b'foo.bar 1.1234567891 1000000000'),
(('foo.bar', (1000000000, 1)), b'foo.bar 1 1000000000'),
(('foo.bar', (1000000000, 1.498566361088E12)), b'foo.bar 1498566361088 1000000000'),
]

i = 0
Expand Down

0 comments on commit 9653e7a

Please sign in to comment.