get_statistics_subset should return well-formatted null results
authorBenjamin Anderson <b@banjiewen.net>
Sun, 17 Nov 2013 02:19:37 +0000 (18:19 -0800)
committerBenjamin Anderson <b@banjiewen.net>
Sun, 17 Nov 2013 02:24:35 +0000 (18:24 -0800)
commit1a902e8c37f5f894a6b3203ee8a0279ff543eb82
tree3919f25f7a20c7e3bb7ab5b3215b8827bd45d5f4
parent7d1ee8e0072341c5d61034560d889450a5bf468f
get_statistics_subset should return well-formatted null results

The existing code for handling lists of values that don't meet minimum
length causes problems when the `percentiles` key is used; e.g., rather
than the expected

    [{percentile, [{0.5, 0.0}, ... ]}]

the user is presented with

    [{{percentile, [0.5, ... ]}, 0.0}]

which doesn't match the formatting for other subset key. This patch
special-cases the `percentile` key to return the expected result.
src/bear.erl