Repository: couchdb Updated Branches: refs/heads/1.x.x f18f82a87 -> 1545bf424
Remove broken benchmarks While I tried to land COUCHDB-1432 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. Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/1545bf42 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/1545bf42 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/1545bf42 Branch: refs/heads/1.x.x Commit: 1545bf4244fa8787d00e189abcef51533d1ca5e8 Parents: f18f82a Author: Robert Kowalski <[email protected]> Authored: Sat Nov 8 13:30:11 2014 +0100 Committer: Robert Kowalski <[email protected]> Committed: Sat Nov 22 03:29:56 2014 +0100 ---------------------------------------------------------------------- .gitignore | 1 - configure.ac | 1 - license.skip | 2 - test/Makefile.am | 2 +- test/bench/Makefile.am | 22 --------- test/bench/bench_marks.js | 103 ----------------------------------------- test/bench/run.tpl | 28 ----------- 7 files changed, 1 insertion(+), 158 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/1545bf42/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index 4b12bf7..19f0748 100644 --- a/.gitignore +++ b/.gitignore @@ -127,7 +127,6 @@ src/snappy/priv src/snappy/snappy.app stamp-h1 test/.deps/ -test/bench/run test/etap/.deps/ test/etap/run test/etap/run http://git-wip-us.apache.org/repos/asf/couchdb/blob/1545bf42/configure.ac ---------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index 6567585..dd9a6d8 100644 --- a/configure.ac +++ b/configure.ac @@ -756,7 +756,6 @@ AC_CONFIG_FILES([src/snappy/Makefile]) AC_CONFIG_FILES([src/snappy/google-snappy/snappy-stubs-public.h]) AC_CONFIG_FILES([src/ejson/Makefile]) AC_CONFIG_FILES([test/Makefile]) -AC_CONFIG_FILES([test/bench/Makefile]) AC_CONFIG_FILES([test/etap/Makefile]) AC_CONFIG_FILES([test/etap/test_util.erl]) AC_CONFIG_FILES([test/javascript/Makefile]) http://git-wip-us.apache.org/repos/asf/couchdb/blob/1545bf42/license.skip ---------------------------------------------------------------------- diff --git a/license.skip b/license.skip index 45558d1..2e541a1 100644 --- a/license.skip +++ b/license.skip @@ -164,8 +164,6 @@ ^stamp-h1 ^test/Makefile ^test/Makefile.in -^test/bench/Makefile -^test/bench/Makefile.in ^test/etap/.*.beam ^test/etap/.*.o ^test/etap/.deps/.* http://git-wip-us.apache.org/repos/asf/couchdb/blob/1545bf42/test/Makefile.am ---------------------------------------------------------------------- diff --git a/test/Makefile.am b/test/Makefile.am index 7c70a5a..88c317b 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -10,6 +10,6 @@ ## License for the specific language governing permissions and limitations under ## the License. -SUBDIRS = bench etap javascript view_server +SUBDIRS = etap javascript view_server EXTRA_DIST = random_port.ini http://git-wip-us.apache.org/repos/asf/couchdb/blob/1545bf42/test/bench/Makefile.am ---------------------------------------------------------------------- diff --git a/test/bench/Makefile.am b/test/bench/Makefile.am deleted file mode 100644 index ce39c4b..0000000 --- a/test/bench/Makefile.am +++ /dev/null @@ -1,22 +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. - -EXTRA_DIST = benchbulk.sh bench_marks.js run.tpl - -noinst_SCRIPTS = run -CLEANFILES = run - -run: run.tpl - sed -e "s|%abs_top_srcdir%|$(abs_top_srcdir)|" \ - -e "s|%abs_top_builddir%|$(abs_top_builddir)|" \ - < $< > $@ - chmod +x $@ http://git-wip-us.apache.org/repos/asf/couchdb/blob/1545bf42/test/bench/bench_marks.js ---------------------------------------------------------------------- diff --git a/test/bench/bench_marks.js b/test/bench/bench_marks.js deleted file mode 100644 index 4025adb..0000000 --- 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); -}; http://git-wip-us.apache.org/repos/asf/couchdb/blob/1545bf42/test/bench/run.tpl ---------------------------------------------------------------------- diff --git a/test/bench/run.tpl b/test/bench/run.tpl deleted file mode 100755 index 9307863..0000000 --- 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 - -
