aboutsummaryrefslogtreecommitdiff
path: root/wqflask/dbFunction/webqtlDatabaseFunction.py
diff options
context:
space:
mode:
authorPjotr Prins2016-06-21 09:10:40 +0000
committerPjotr Prins2016-06-21 09:10:40 +0000
commit74ab1eff68fdad4183ce2a7490cfbc9ac1f4513f (patch)
treefc8733378c82d0b55fde284b39d4072692499bf2 /wqflask/dbFunction/webqtlDatabaseFunction.py
parentaa638a88e843657bb80f1db1e726b6135cefd11f (diff)
downloadgenenetwork2-74ab1eff68fdad4183ce2a7490cfbc9ac1f4513f.tar.gz
Benchmarking: allow output select with LOG_BENCH
Diffstat (limited to 'wqflask/dbFunction/webqtlDatabaseFunction.py')
-rw-r--r--wqflask/dbFunction/webqtlDatabaseFunction.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/wqflask/dbFunction/webqtlDatabaseFunction.py b/wqflask/dbFunction/webqtlDatabaseFunction.py
index 4a0fb40f..b14c9312 100644
--- a/wqflask/dbFunction/webqtlDatabaseFunction.py
+++ b/wqflask/dbFunction/webqtlDatabaseFunction.py
@@ -28,7 +28,7 @@ import string
import urllib2
import json
from base import webqtlConfig
-from utility.tools import USE_GN_SERVER
+from utility.tools import USE_GN_SERVER, LOG_SQL
from utility.benchmark import Bench
from utility.logger import getLogger
@@ -51,7 +51,7 @@ def fetchone(query):
"""Return tuple containing one row by calling SQL directly
"""
- with Bench("SQL took"):
+ with Bench("SQL took",LOG_SQL):
def helper(query):
res = g.db.execute(query)
return res.fetchone()
@@ -62,7 +62,7 @@ def gn_server(path):
"""Return JSON record by calling GN_SERVER
"""
- with Bench("GN_SERVER took"):
+ with Bench("GN_SERVER took",LOG_SQL):
res = urllib2.urlopen("http://localhost:8880/"+path)
rest = res.read()
res2 = json.loads(rest)