示例#1
0
 def recv_broadcast(self, objects):
     t = funcs.timer_start()
     for obj in objects:
         scale(obj)
         obj.store(self.storage)
     logger.debug("wrote %d events [walltime: %s]" %
                  (len(objects), funcs.timer_stop(t)))
示例#2
0
 def load_events(self, key, cc):
     nan = read_nanopt(self.get_argument("nan", "purge"))
     t0  = funcs.timer_start()
     t1  = lambda: {"walltime": funcs.timer_stop(t0)}
     cc.addCallback(lambda r: self.finish({"status" : 200,
                                           "results": {key: {"series": render_series(r, nan)}},
                                           "debug"  : t1()
                                          }))\
       .addErrback(self.catch)
示例#3
0
文件: storage.py 项目: deferraz/leela
 def recv_broadcast(self, objects):
     t = funcs.timer_start()
     for obj in objects:
         scale(obj)
         obj.store(self.storage)
     logger.debug("wrote %d events [walltime: %s]" % (len(objects), funcs.timer_stop(t)))