diff --git a/findLogFilesGUI.py b/findLogFilesGUI.py index 8573b6d..c0bbbf4 100644 --- a/findLogFilesGUI.py +++ b/findLogFilesGUI.py @@ -44,7 +44,7 @@ import werExtractor import netaddr from urllib2 import urlopen -import json +import time from java.lang import System from java.util.logging import Level @@ -161,6 +161,7 @@ def get_ip_type(self, ip): def startUp(self, context): # For statistics purposes self.filesFound = 0 + self.start_time = time.time() # Get Sleuthkit case skCase = Case.getCurrentCase().getSleuthkitCase() @@ -580,6 +581,8 @@ def process(self, file): # Where any shutdown code is run and resources are freed. def shutDown(self): + elapsed_time = time.time() - self.start_time + self.log(Level.INFO, "LFA execution time: "+str(elapsed_time)) # Inform user of number of files found message = IngestMessage.createMessage(IngestMessage.MessageType.DATA, LogForensicsForAutopsyFileIngestModuleWithUIFactory.moduleName, diff --git a/guiSettings.db b/guiSettings.db index 1c554b6..06176b6 100644 Binary files a/guiSettings.db and b/guiSettings.db differ diff --git a/reportWer.py b/reportWer.py index d46e64a..a142858 100644 --- a/reportWer.py +++ b/reportWer.py @@ -35,7 +35,7 @@ import xlsxwriter import datetime from urllib2 import urlopen -import json +import time from dfxmlwriter import dfxml_writer @@ -154,6 +154,9 @@ def write_artifact_to_report(self, skCase, progressBar, art_count, generateHTML, def generateReport(self, baseReportDir, progressBar): self.log(Level.INFO, "Starting LFA report module") + # Count execution time + start_time = time.time() + # Configure progress bar for 2 tasks progressBar.setIndeterminate(False) progressBar.start() @@ -742,6 +745,11 @@ def generateReport(self, baseReportDir, progressBar): # Add the report to the Case, so it is shown in the tree Case.getCurrentCase().addReport(xls_file_name, self.moduleName, "LFA Excel Report") + # Elapsed time + elapsed_time = time.time() - start_time + + self.log(Level.INFO, "Execution time: "+str(elapsed_time)) + # Call this with ERROR if report was not generated progressBar.complete(ReportStatus.COMPLETE)