Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix tests for new exdec impl

  • Loading branch information...
commit c839a91d63ea658e61aa394272bc3ae50e15233a 1 parent 703cf47
@joewilliams joewilliams authored
Showing with 16 additions and 3 deletions.
  1. +16 −3 test/folsom_erlang_checks.erl
View
19 test/folsom_erlang_checks.erl
@@ -82,7 +82,9 @@ populate_metrics() ->
ok = folsom_metrics:notify({<<"gauge">>, 2}),
[ok = folsom_metrics:notify({<<"uniform">>, Value}) || Value <- ?DATA],
- [ok = folsom_metrics:notify({exdec, Value}) || Value <- ?DATA],
+
+ [ok = folsom_metrics:notify({exdec, Value}) || Value <- lists:seq(1, 100000)],
+
[ok = folsom_metrics:notify({none, Value}) || Value <- ?DATA],
[ok = folsom_metrics:notify({nonea, Value}) || Value <- ?DATA1],
@@ -124,8 +126,19 @@ check_metrics() ->
Histogram1 = folsom_metrics:get_histogram_statistics(<<"uniform">>),
histogram_checks(Histogram1),
- Histogram2 = folsom_metrics:get_histogram_statistics(exdec),
- histogram_checks(Histogram2),
+
+ % just check exdec for non-zero values
+ Exdec = folsom_metrics:get_histogram_statistics(exdec),
+
+ ?debugFmt("checking exdec sample~n~p~n", [Exdec]),
+
+ ok = case proplists:get_value(median, Exdec) of
+ Median when Median > 0 ->
+ ok;
+ _ ->
+ error
+ end,
+
Histogram3 = folsom_metrics:get_histogram_statistics(none),
histogram_checks(Histogram3),
Please sign in to comment.
Something went wrong with that request. Please try again.