Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aql/python: add some debugging info to queries #130

Merged
merged 2 commits into from
Aug 2, 2018
Merged

Conversation

adamstruck
Copy link
Contributor

@adamstruck adamstruck commented Aug 1, 2018

Addresses #129 on the client side. The query described in the issue is returned in a similar timeframe using either the python client or curl.

  • Sets chunk_size to None in iter_lines method on response object.
  • Add debug logging to execute. See below. <Query instance>.execute(debug=True)
[DEBUG]    2018-08-01 10:50:13,692    POST http://arachne.compbio.ohsu.edu/v1/graph/bmeg/query
[DEBUG]    2018-08-01 10:50:13,694    BODY {"query": [{"v": []}, {"where": {"condition": {"key": "_label", "value": "Individual", "condition": "EQ"}}}, {"where": {"and": {"expressions": [{"condition": {"key": "source", "value": "tcga", "condition": "EQ"}}, {"condition": {"key": "disease_code", "value": "BRCA", "condition": "EQ"}}]}}}, {"in": ["sampleOf"]}, {"mark": "a"}, {"in": ["expressionFor"]}, {"render": ["$a.name", "$.expressions"]}]}
[DEBUG]    2018-08-01 10:50:13,695    STATUS CODE 200
[DEBUG]    2018-08-01 10:50:46,753    rate: 100 results processed (3/sec)
[DEBUG]    2018-08-01 10:51:17,131    rate: 200 results processed (3/sec)
[DEBUG]    2018-08-01 10:51:44,909    rate: 300 results processed (3/sec)
[DEBUG]    2018-08-01 10:52:11,921    rate: 400 results processed (3/sec)
[DEBUG]    2018-08-01 10:52:38,045    rate: 500 results processed (3/sec)
[DEBUG]    2018-08-01 10:53:03,918    rate: 600 results processed (3/sec)
[DEBUG]    2018-08-01 10:53:30,019    rate: 700 results processed (3/sec)
[DEBUG]    2018-08-01 10:53:56,306    rate: 800 results processed (3/sec)
[DEBUG]    2018-08-01 10:54:22,707    rate: 900 results processed (3/sec)
[DEBUG]    2018-08-01 10:54:48,587    rate: 1,000 results processed (3/sec)
[DEBUG]    2018-08-01 10:55:14,919    rate: 1,100 results processed (3/sec)
[DEBUG]    2018-08-01 10:55:19,348    rate: 1,116 results processed (22/sec)
[INFO]    2018-08-01 10:55:19,349    total: 1,116 results processed in 305 seconds



class Rate:
def __init__(self, logger: logging.Logger, report_every: int = 100):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is some python3 specific syntax, and it broke the travis testing

@adamstruck adamstruck merged commit 5dbc166 into master Aug 2, 2018
@adamstruck adamstruck deleted the aql-python branch September 19, 2018 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants