Skip to content

Commit

Permalink
adding in a finaltime in query
Browse files Browse the repository at this point in the history
  • Loading branch information
havok2063 committed Feb 9, 2018
1 parent c805353 commit c304c7c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions python/marvin/tools/query.py
Expand Up @@ -798,11 +798,17 @@ def run(self, start=None, end=None, raw=None, orm=None, core=None):
# clear the session
self.session.close()

#memory_usage('7 - after session close, before results dump')
# memory_usage('7 - after session close, before results dump')

return Results(results=res, query=self.query, count=count, mode=self.mode,
returntype=self.returntype, queryobj=self, totalcount=self.totalcount,
chunk=self.limit, runtime=self.runtime, start=start, end=end)
final = Results(results=res, query=self.query, count=count, mode=self.mode,
returntype=self.returntype, queryobj=self, totalcount=self.totalcount,
chunk=self.limit, runtime=self.runtime, start=start, end=end)

# get the final time
posttime = datetime.datetime.now()
self.finaltime = (posttime - starttime)

return final

elif self.mode == 'remote':
# Fail if no route map initialized
Expand Down

0 comments on commit c304c7c

Please sign in to comment.