Permalink
Browse files

Add "n" value to stats proplist to determine number of observations

  • Loading branch information...
1 parent 7ef9a7b commit 7cb6a632a2d1f01fd05c55f692dcd338bf8c89d2 @dizzyd dizzyd committed Aug 24, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/bear.erl
View
@@ -61,7 +61,8 @@ get_statistics(Values) when length(Values) < ?STATS_MIN ->
{999, 0.0}
]
},
- {histogram, [{0, 0}]}
+ {histogram, [{0, 0}]},
+ {n, 0}
];
get_statistics(Values) ->
Scan_res = scan_values(Values),
@@ -87,7 +88,8 @@ get_statistics(Values) ->
{999, percentile(SortedValues, Scan_res, 0.999)}
]
},
- {histogram, get_histogram(Values, Scan_res, Scan_res2)}
+ {histogram, get_histogram(Values, Scan_res, Scan_res2)},
+ {n, Scan_res#scan_result.n}
].
get_statistics(Values, _) when length(Values) < ?STATS_MIN ->

0 comments on commit 7cb6a63

Please sign in to comment.