couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [1/2] couch-stats commit: updated refs/heads/master to d7310e5
Date Sat, 23 Aug 2014 17:10:37 GMT
Repository: couchdb-couch-stats
Updated Branches:
  refs/heads/master d06966579 -> d7310e546


Format nested functions properly


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-stats/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-stats/commit/1461beb1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-stats/tree/1461beb1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-stats/diff/1461beb1

Branch: refs/heads/master
Commit: 1461beb1acd912276d40d72113362b0a9905c4c0
Parents: d069665
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Sat Aug 23 12:09:46 2014 -0500
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Sat Aug 23 12:10:23 2014 -0500

----------------------------------------------------------------------
 src/couch_stats_httpd.erl | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-stats/blob/1461beb1/src/couch_stats_httpd.erl
----------------------------------------------------------------------
diff --git a/src/couch_stats_httpd.erl b/src/couch_stats_httpd.erl
index ad42930..b7abe63 100644
--- a/src/couch_stats_httpd.erl
+++ b/src/couch_stats_httpd.erl
@@ -36,16 +36,16 @@ transform_stats([{Key, Props} | Rest], Acc) ->
 transform_stat(counter, Props) ->
     Props;
 transform_stat(histogram, Props) ->
-    lists:map(
-      fun({value, Value}) ->
-              {value, lists:map(
-                fun({Key, List}) when Key == percentile; Key == histogram ->
-                        {Key, [tuple_to_list(Item) || Item <- List]};
-                   (Else) ->
-                        Else
-                end, Value)};
-         (Else) ->
-              Else
+    lists:map(fun
+        ({value, Value}) ->
+            {value, lists:map(fun
+                ({Key, List}) when Key == percentile; Key == histogram ->
+                    {Key, [tuple_to_list(Item) || Item <- List]};
+                (Else) ->
+                    Else
+            end, Value)};
+        (Else) ->
+            Else
       end, Props).
 
 


Mime
View raw message