couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r748622 - in /couchdb/trunk: share/www/script/test/stats.js src/couchdb/couch_stats_aggregator.erl
Date Fri, 27 Feb 2009 18:07:38 GMT
Author: jan
Date: Fri Feb 27 18:07:37 2009
New Revision: 748622

URL: http://svn.apache.org/viewvc?rev=748622&view=rev
Log:
- remove unused aggregate metrics field
- return an empty object when there are no stats

Modified:
    couchdb/trunk/share/www/script/test/stats.js
    couchdb/trunk/src/couchdb/couch_stats_aggregator.erl

Modified: couchdb/trunk/share/www/script/test/stats.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/stats.js?rev=748622&r1=748621&r2=748622&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/stats.js (original)
+++ couchdb/trunk/share/www/script/test/stats.js Fri Feb 27 18:07:37 2009
@@ -393,7 +393,7 @@
      options.headers = {"Accept": "application/json"};
      var summary = JSON.parse(CouchDB.request("GET", "/_stats", options).responseText);
      var aggregates = ["mean", "min", "max", "stddev", 
-       "current", "resolution"];
+       "current"];
 
      for(var i in aggregates) {
        T(summary.httpd.requests[aggregates[i]] >= 0, aggregates[i] + " >= 0", name);

Modified: couchdb/trunk/src/couchdb/couch_stats_aggregator.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_stats_aggregator.erl?rev=748622&r1=748621&r2=748622&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_stats_aggregator.erl (original)
+++ couchdb/trunk/src/couchdb/couch_stats_aggregator.erl Fri Feb 27 18:07:37 2009
@@ -260,7 +260,6 @@
         {min, Min},
         {max, Max},
         {stddev, Stddev},
-        {resolution, 1},
         {description, Description}
     ]}.
 
@@ -271,7 +270,7 @@
 % Thanks to Paul Davis
 do_get_all(#state{aggregates=Stats}=State) ->
     case Stats of
-        [] -> {[{ok, no_stats_yet}]};
+        [] -> {[{}]};
         _ ->
         [{LastMod, LastVals} | LastRestMods] = lists:foldl(fun({{Module, Key}, _Count}, AccIn)
->
               case AccIn of



Mime
View raw message