aboutsummaryrefslogtreecommitdiff
path: root/runbenchmark.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-04-12 14:27:10 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-04-12 14:27:10 +0200
commitae67e23af7993199391b962eca2cbecfe9f8a8d5 (patch)
treeeda41eb3a19cf705072c28c31d369f2dc2ca848f /runbenchmark.py
parentPrepare database initialization script for the new release. (diff)
downloadnewspipe-ae67e23af7993199391b962eca2cbecfe9f8a8d5.tar.gz
newspipe-ae67e23af7993199391b962eca2cbecfe9f8a8d5.tar.bz2
newspipe-ae67e23af7993199391b962eca2cbecfe9f8a8d5.zip
Removed benchmark scripts.
Diffstat (limited to 'runbenchmark.py')
-rw-r--r--runbenchmark.py73
1 files changed, 0 insertions, 73 deletions
diff --git a/runbenchmark.py b/runbenchmark.py
deleted file mode 100644
index 8241e52b..00000000
--- a/runbenchmark.py
+++ /dev/null
@@ -1,73 +0,0 @@
-#! /usr/bin/env python
-#-*- coding: utf-8 -*-
-
-
-import time
-from benchmark import testelasticsearch
-from benchmark import testwhoosh
-
-import conf
-from pyaggr3g470r import models
-models.connect(conf.DATABASE_NAME)
-
-articles = models.Article.objects()
-
-
-
-#
-# Index generation
-#
-
-print "Indexes generation..."
-# Whoosh
-print "Whoosh"
-begin = time.time()
-testwhoosh.create_index(articles)
-end = time.time()
-print end - begin
-
-print
-
-# ElasticSearch
-print "ElasticSearch"
-testelasticsearch.delete_index()
-begin = time.time()
-testelasticsearch.create_index(articles)
-end = time.time()
-print end - begin
-
-
-
-print
-print
-print
-
-
-
-#
-# Search
-#
-print "Search..."
-for query in ["Edward Snowden", "Saint-Pierre-et-Miquelon", "micropatronage"]:
- print "Query:", query
-
- # Whoosh
- print "with Whoosh"
- for _ in range(5):
- begin = time.time()
- testwhoosh.search(query)
- end = time.time()
- print end - begin
-
- print
-
- # ElasticSearch
- print "with ElasticSearch"
- for _ in range(5):
- begin = time.time()
- testelasticsearch.search(query)
- end = time.time()
- print end - begin
-
- print
- print \ No newline at end of file
bgstack15