Did I find the right examples for you? yes no

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

src/s/e/seal-0.4.0-rc2/seal/lib/mr/hadoop_event_monitor.py   seal(Download)
 
from seal.lib.event_monitor import EventMonitor
from seal.lib import TIME_TICK
 
import time
    def stop(self, s):
        delta = time.time() - self.__start_times[s]
        self.ctx.incrementCounter(self.__get_timing_counter(s), int(delta/TIME_TICK))
        status = "done with %s (%.3f s)" % (s, delta)
        self.ctx.setStatus(status)
        self.log_debug(status)
 
    def stop_batch(self, s, offset, n):
        delta = time.time() - self.__start_times[s]
        self.ctx.incrementCounter(self.__get_timing_counter(s), int(delta/TIME_TICK))