Skip to content

Commit

Permalink
Added execution times
Browse files Browse the repository at this point in the history
  • Loading branch information
L-Andrade committed Jun 18, 2018
1 parent 205feb7 commit 2d15306
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 4 additions & 1 deletion findLogFilesGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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,
Expand Down
Binary file modified guiSettings.db
Binary file not shown.
10 changes: 9 additions & 1 deletion reportWer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import xlsxwriter
import datetime
from urllib2 import urlopen
import json
import time

from dfxmlwriter import dfxml_writer

Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 2d15306

Please sign in to comment.