Ejemplo n.º 1
0
 def elapsedTime(self):
     if not self._startTime:
         return 0
     return TimeUtils.getElapsedTime(
         startDateTime=self._startTime,
         endDateTime=TimeUtils.getNowDatetime(),
         toUnit=TimeUtils.MILLISECONDS)
Ejemplo n.º 2
0
    def _writeFooter(self):
        """ The final method called in the analysis process, which writes the final information
            about the analysis stage to the log file for reference. This includes basic operational
            information about performance by default. """

        elapsed = TimeUtils.getElapsedTime(
            startDateTime=self._startTime,
            endDateTime=TimeUtils.getNowDatetime(),
            toUnit=TimeUtils.MILLISECONDS)

        self.logger.write([
            '\n' + 80*'_',
            '[COMPLETE]: %s ANALYSIS STAGE' % self._label.upper(),
            '  * Elapsed Time: %s' % TimeUtils.toPrettyElapsedTime(elapsed)
        ] + self._getFooterArgs(), indent=False)