summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Kowalski <rok@kowalski.gd>2014-11-08 13:34:43 +0100
committerRobert Kowalski <robertkowalski@apache.org>2014-11-11 11:31:46 +0100
commitcf3b48e47f03dfb307b1139d2751a3580c6532c8 (patch)
tree69a70d7757803c0c14b8a315a966a537136ca5df
parent6306428acdf829404898d25702e3d99a0a3c3a7c (diff)
downloadcouchdb-cf3b48e47f03dfb307b1139d2751a3580c6532c8.tar.gz
Remove leftovers from broken becnhmark
While I tried to land COUCHDB-1432 on 1..x.x it turned out that /benches/run is broken in several places for a longer time and nobody noticed: When trying to fix it (adding a file called test_setup.js) to the template, we will get the next error. As nobody noticed that it is broken for a longer time it seems we currently have no need for benchmarks, and if we have that need, we should add new ones which reflect our current needs and are compatible with 2.0 too. This removes the leftovers of the benchmark which is also broken on 1.6.x for a longer, unknown time which was already deleted in parts for 2.0
-rw-r--r--license.skip2
-rw-r--r--test/bench/bench_marks.js103
-rwxr-xr-xtest/bench/run.tpl28
3 files changed, 0 insertions, 133 deletions
diff --git a/license.skip b/license.skip
index 9c1d6acbc..55adcd88d 100644
--- a/license.skip
+++ b/license.skip
@@ -189,8 +189,6 @@
^stamp-h1
^test/Makefile
^test/Makefile.in
-^test/bench/Makefile
-^test/bench/Makefile.in
^test/etap/.*.beam
^test/etap/.*.o
^test/etap/etap.erl
diff --git a/test/bench/bench_marks.js b/test/bench/bench_marks.js
deleted file mode 100644
index 4025adbbe..000000000
--- a/test/bench/bench_marks.js
+++ /dev/null
@@ -1,103 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-var NUM_DOCS = 2000;
-var NUM_BATCHES = 20;
-
-var init = function() {
- var db = new CouchDB("bench_mark_db", {"X-Couch-Full-Commit": "false"});
- db.deleteDb();
- db.createDb();
- return db;
-};
-
-var timeit = function(func) {
- var startTime = (new Date()).getTime();
- func();
- return ((new Date()).getTime() - startTime) / 1000;
-};
-
-var report = function(name, rate) {
- rate = Math.round(parseFloat(rate) * 100) / 100;
- console.log("" + name + ": " + rate + " docs/second");
-};
-
-var makeDocs = function(n) {
- docs = [];
- for (var i=0; i < n; i++) {
- docs.push({"foo":"bar"});
- };
- return docs;
-};
-
-var couchTests = {};
-
-couchTests.single_doc_insert = function() {
- var db = init();
- var len = timeit(function() {
- for(var i = 0; i < NUM_DOCS; i++) {
- db.save({"foo": "bar"});
- }
- });
- report("Single doc inserts", NUM_DOCS/len);
-};
-
-couchTests.batch_ok_doc_insert = function() {
- var db = init();
- var len = timeit(function() {
- for(var i = 0; i < NUM_DOCS; i++) {
- db.save({"foo":"bar"}, {"batch":"ok"});
- }
- });
- report("Single doc inserts with batch=ok", NUM_DOCS/len);
-};
-
-couchTests.bulk_doc_100 = function() {
- var db = init();
- var len = timeit(function() {
- for(var i = 0; i < NUM_BATCHES; i++) {
- db.bulkSave(makeDocs(100));
- }
- });
- report("Bulk docs - 100", (NUM_BATCHES*100)/len);
-};
-
-couchTests.bulk_doc_1000 = function() {
- var db = init();
- var len = timeit(function() {
- for(var i = 0; i < NUM_BATCHES; i++) {
- db.bulkSave(makeDocs(1000));
- }
- });
- report("Bulk docs - 1000", (NUM_BATCHES*1000)/len);
-};
-
-
-couchTests.bulk_doc_5000 = function() {
- var db = init();
- var len = timeit(function() {
- for(var i = 0; i < NUM_BATCHES; i++) {
- db.bulkSave(makeDocs(5000));
- }
- });
- report("Bulk docs - 5000", (NUM_BATCHES*5000)/len);
-};
-
-couchTests.bulk_doc_10000 = function() {
- var db = init();
- var len = timeit(function() {
- for(var i = 0; i < NUM_BATCHES; i++) {
- db.bulkSave(makeDocs(10000));
- }
- });
- report("Bulk docs - 10000", (NUM_BATCHES*10000)/len);
-};
diff --git a/test/bench/run.tpl b/test/bench/run.tpl
deleted file mode 100755
index 9307863fe..000000000
--- a/test/bench/run.tpl
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh -e
-
-# Licensed under the Apache License, Version 2.0 (the "License"); you may not
-# use this file except in compliance with the License. You may obtain a copy of
-# the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations under
-# the License.
-
-SRC_DIR=%abs_top_srcdir%
-SCRIPT_DIR=$SRC_DIR/share/www/script
-JS_TEST_DIR=$SRC_DIR/test/javascript
-JS_BENCH_DIR=$SRC_DIR/test/bench
-
-COUCHJS=%abs_top_builddir%/src/couchdb/priv/couchjs
-
-cat $SCRIPT_DIR/json2.js \
- $SCRIPT_DIR/couch.js \
- $JS_TEST_DIR/couch_http.js \
- $JS_BENCH_DIR/bench_marks.js \
- $JS_TEST_DIR/cli_runner.js \
- | $COUCHJS -
-