summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2009-10-16 21:38:11 +0000
committerJohn Christopher Anderson <jchris@apache.org>2009-10-16 21:38:11 +0000
commit2df3fabfdc2039504295219c88e0d160f76c1afb (patch)
treebf6784d510c7e0fec2705a490dce3933e81ddcbd /share
parent51230872ffbedfcfcbc99ccc44d166f79307c7f0 (diff)
added bench/ directory to trunk, contains 2 benchmark suites.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@826097 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share')
-rw-r--r--share/www/script/couch.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/share/www/script/couch.js b/share/www/script/couch.js
index 86465c95..bac3881c 100644
--- a/share/www/script/couch.js
+++ b/share/www/script/couch.js
@@ -436,7 +436,8 @@ CouchDB.requestStats = function(module, key, test) {
CouchDB.uuids_cache = [];
-CouchDB.newUuids = function(n) {
+CouchDB.newUuids = function(n, buf) {
+ buf = buf || 100;
if (CouchDB.uuids_cache.length >= n) {
var uuids = CouchDB.uuids_cache.slice(CouchDB.uuids_cache.length - n);
if(CouchDB.uuids_cache.length - n == 0) {
@@ -447,12 +448,12 @@ CouchDB.newUuids = function(n) {
}
return uuids;
} else {
- CouchDB.last_req = CouchDB.request("GET", "/_uuids?count=" + (100 + n));
+ CouchDB.last_req = CouchDB.request("GET", "/_uuids?count=" + (buf + n));
CouchDB.maybeThrowError(CouchDB.last_req);
var result = JSON.parse(CouchDB.last_req.responseText);
CouchDB.uuids_cache =
- CouchDB.uuids_cache.concat(result.uuids.slice(0, 100));
- return result.uuids.slice(100);
+ CouchDB.uuids_cache.concat(result.uuids.slice(0, buf));
+ return result.uuids.slice(buf);
}
}