Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

analyze_logfile_object hook

  • Loading branch information...
commit 4c5598d9a593e20b18343ea339555d928ac13b97 1 parent db43db3
@esedor esedor authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 dex/dex.py
View
13 dex/dex.py
@@ -240,6 +240,19 @@ def analyze_logfile(self, logfile_path):
return 0
############################################################################
+ def analyze_logfile_object(self, file_object):
+ """Analyzes queries from a given log file"""
+ run_stats = self._get_initial_run_stats()
+ log_parser = LogParser()
+
+ # For each line in the logfile ...
+ for line in file_object:
+ self._process_query(line, log_parser, run_stats)
+ self._output_aggregated_report(sys.stdout, run_stats)
+
+ return 0
+
+ ############################################################################
def watch_logfile(self, logfile_path):
"""Analyzes queries from the tail of a given log file"""
run_stats = self._get_initial_run_stats()
Please sign in to comment.
Something went wrong with that request. Please try again.