Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix test, include cmath for memset declaration

  • Loading branch information...
commit 16d564ae8ea0f74fd482bac4ab771e2d88c41b32 1 parent ce6352e
@argv0 argv0 authored
Showing with 4 additions and 3 deletions.
  1. +1 −0  c_src/basho_metrics_nifs.cpp
  2. +3 −3 src/basho_metrics_nifs.erl
View
1  c_src/basho_metrics_nifs.cpp
@@ -22,6 +22,7 @@
#include "basho_metrics_nifs.h"
#include "histogram_metric.hpp"
#include "meter_metric.hpp"
+#include <cmath>
#include <vector>
static ErlNifResourceType* histogram_RESOURCE;
View
6 src/basho_metrics_nifs.erl
@@ -61,8 +61,8 @@ meter_tick(_Ref) ->
-ifdef(TEST).
simple_test() ->
- {ok, H} = ?MODULE:histogram_new();
- [?MODULE:update(H, lists:seq(0, 1000000))],
- ?debugFmt("~p~n", [?MODULE:stats(H)]).
+ {ok, H} = ?MODULE:histogram_new(),
+ [?MODULE:histogram_update(H, I) || I <- lists:seq(0, 1000000)],
+ ?debugFmt("~p~n", [?MODULE:histogram_stats(H)]).
-endif.
Please sign in to comment.
Something went wrong with that request. Please try again.