Skip to content

Commit

Permalink
Merge pull request apache#3 from dizzyd/dss-observations-counter
Browse files Browse the repository at this point in the history
Add "n" value to stats proplist to determine number of observations
  • Loading branch information
joewilliams committed Aug 24, 2012
2 parents 7ef9a7b + 7cb6a63 commit b1882d7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/bear.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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 ->
Expand Down

0 comments on commit b1882d7

Please sign in to comment.