You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/07/31 23:10:18 UTC

[27/30] bear commit: updated refs/heads/import-master to 5f99806

Remove un-necessary if statement


Project: http://git-wip-us.apache.org/repos/asf/couchdb-bear/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-bear/commit/f5e777d7
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-bear/tree/f5e777d7
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-bear/diff/f5e777d7

Branch: refs/heads/import-master
Commit: f5e777d711008068ca15a48f95c20b44946995ef
Parents: 1a902e8
Author: Benjamin Anderson <b...@banjiewen.net>
Authored: Sat Nov 16 18:03:58 2013 -0800
Committer: Benjamin Anderson <b...@banjiewen.net>
Committed: Sat Nov 16 18:24:35 2013 -0800

----------------------------------------------------------------------
 src/bear.erl | 24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-bear/blob/f5e777d7/src/bear.erl
----------------------------------------------------------------------
diff --git a/src/bear.erl b/src/bear.erl
index 67f4139..fe79fae 100644
--- a/src/bear.erl
+++ b/src/bear.erl
@@ -98,21 +98,15 @@ get_statistics(Values) when is_list(Values) ->
 
 get_statistics_subset([_,_,_,_,_|_] = Values, Items) ->
     Length = length(Values),
-    if Length < ?STATS_MIN ->
-	    [I || {K,_} = I <- get_statistics([]),
-		  lists:member(K, Items) orelse K==percentiles];
-       true ->
-	    SortedValues = lists:sort(Values),
-	    Steps = calc_steps(Items),
-	    Scan_res = if Steps > 1 -> scan_values(Values);
-			  true -> []
-		       end,
-	    Scan_res2 = if Steps > 2 -> scan_values2(Values, Scan_res);
-			   true -> []
-			end,
-	    report_subset(Items, Length,
-			  SortedValues, Scan_res, Scan_res2)
-    end;
+    SortedValues = lists:sort(Values),
+    Steps = calc_steps(Items),
+    Scan_res = if Steps > 1 -> scan_values(Values);
+        true -> []
+    end,
+    Scan_res2 = if Steps > 2 -> scan_values2(Values, Scan_res);
+        true -> []
+    end,
+    report_subset(Items, Length, SortedValues, Scan_res, Scan_res2);
 get_statistics_subset(Values, Items) when is_list(Values) ->
     get_null_statistics_subset(Items, []).