diff options
author | Munyoki Kilyungi | 2022-08-30 11:36:58 +0300 |
---|---|---|
committer | BonfaceKilz | 2022-08-31 23:14:30 +0300 |
commit | 9d0f492d8a999c1a3eb6525b0ae72bbbcaad4279 (patch) | |
tree | 8bfce7520ce59eb5950f7b1ed7783872344793bf /wqflask/base/data_set.py | |
parent | 8c06a9534d3340ff0287b5c70f63b2000b6eb612 (diff) | |
download | genenetwork2-9d0f492d8a999c1a3eb6525b0ae72bbbcaad4279.tar.gz |
Remove "with Bench ..." calls
"with Bench" instruments how long a function takes and generates time
reports on as INFO logs. This should be done on a developer server.
Should the log level be low enough, this bench marks will generate a
lot of noise. Instrumentation should be done during development.
* wqflask/base/data_set.py (create_datasets_list): Remove "with
Bench...".
* wqflask/db/call.py (fetchone): Ditto.
(fetchall): Ditto.
(gn_server): Ditto.
* wqflask/wqflask/gsearch.py (GSearch.__init__): Ditto.
* wqflask/wqflask/marker_regression/display_mapping_results.py (DisplayMappingResults.__init__): Ditto.
* wqflask/wqflask/marker_regression/run_mapping.py
(RunMapping.__init__): Ditto.
* wqflask/wqflask/update_search_results.py (GSearch.__init__): Ditto.
* wqflask/wqflask/views.py (search_page): Ditto.
(heatmap_page): Ditto.
(mapping_results_page): Ditto.
Diffstat (limited to 'wqflask/base/data_set.py')
-rw-r--r-- | wqflask/base/data_set.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index 8206b67c..33e6f353 100644 --- a/wqflask/base/data_set.py +++ b/wqflask/base/data_set.py @@ -32,7 +32,6 @@ from maintenance import get_group_samplelists from utility.tools import locate, locate_ignore_error, flat_files from utility import gen_geno_ob from utility import chunks -from utility.benchmark import Bench from utility import webqtlUtil from db import webqtlDatabaseFunction from base import species @@ -201,16 +200,15 @@ def create_datasets_list(): if result is None: datasets = list() - with Bench("Creating DataSets object"): - type_dict = {'Publish': 'PublishFreeze', - 'ProbeSet': 'ProbeSetFreeze', - 'Geno': 'GenoFreeze'} - - for dataset_type in type_dict: - query = "SELECT Name FROM {}".format(type_dict[dataset_type]) - for result in fetchall(query): - dataset = create_dataset(result.Name, dataset_type) - datasets.append(dataset) + type_dict = {'Publish': 'PublishFreeze', + 'ProbeSet': 'ProbeSetFreeze', + 'Geno': 'GenoFreeze'} + + for dataset_type in type_dict: + query = "SELECT Name FROM {}".format(type_dict[dataset_type]) + for result in fetchall(query): + dataset = create_dataset(result.Name, dataset_type) + datasets.append(dataset) if USE_REDIS: r.set(key, pickle.dumps(datasets, pickle.HIGHEST_PROTOCOL)) |