Exemple #1
0
 def update_cache(self, event: Event) -> None:
     log.debug('Updating the Graph Cache')
     graph = event.data
     log.debug('Generating metrics cache')
     self._metrics_cache = graph2metrics(graph)
     log.debug('Generating pickle cache')
     self._pickle_cache = graph2pickle(graph)
Exemple #2
0
 def metrics(self):
     if self.cache and self.cache.metrics:
         return self.cache.metrics
     else:
         return graph2metrics(self.graph)