Skip to content

Commit

Permalink
Merge 9001a43 into 6c1f703
Browse files Browse the repository at this point in the history
  • Loading branch information
lpgauth committed Dec 15, 2016
2 parents 6c1f703 + 9001a43 commit 32ba9c9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ cache:
directories:
- $HOME/.cache/rebar3
- $TRAVIS_BUILD_DIR/_build
dist: trusty
env:
- CC=gcc-5
group: edge
install: true
language: erlang
notifications:
Expand All @@ -18,4 +20,3 @@ otp_release:
- 19.1
- 18.3
script: "make travis"
sudo: false
2 changes: 1 addition & 1 deletion src/statsderl_protocol.erl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ encode({timing, Key, Value}) ->
format_sample_rate(SampleRate) when SampleRate >= 1 ->
<<>>;
format_sample_rate(SampleRate) ->
[<<"|@">>, float_to_list(SampleRate, [{decimals, 3}])].
[<<"|@">>, float_to_list(SampleRate, [compact, {decimals, 6}])].

format_value(Value) when is_integer(Value) ->
integer_to_list(Value);
Expand Down
2 changes: 1 addition & 1 deletion test/statsderl_tests.erl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ sampling_rate_subtest(Socket) ->
meck:new(granderl, [passthrough, no_history]),
meck:expect(granderl, uniform, fun (?MAX_UNSIGNED_INT_32) -> 1 end),
statsderl:counter("test", 1, 0.1234),
assert_packet(Socket, <<"test:1|c|@0.123">>),
assert_packet(Socket, <<"test:1|c|@0.1234">>),
meck:expect(granderl, uniform, fun (?MAX_UNSIGNED_INT_32) ->
?MAX_UNSIGNED_INT_32
end),
Expand Down

0 comments on commit 32ba9c9

Please sign in to comment.