Commit dc78998b authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

Checker: Add timer on mage checker.

Showing with 3 additions and 1 deletion
+3 -1
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
import time import time
from queue import Queue from queue import Queue
from tools import flatten from tools import flatten, timer
from PyQt5.QtCore import QCoreApplication from PyQt5.QtCore import QCoreApplication
...@@ -25,6 +25,7 @@ class MageNetworkGraphChecker(AbstractModelChecker): ...@@ -25,6 +25,7 @@ class MageNetworkGraphChecker(AbstractModelChecker):
self._name = _translate("Checker", f"Mage network graph {mode} checker") self._name = _translate("Checker", f"Mage network graph {mode} checker")
self._description = _translate("Checker", "Check if the network graph is valid") self._description = _translate("Checker", "Check if the network graph is valid")
@timer
def _connectivity(self, summary, status, graph): def _connectivity(self, summary, status, graph):
# Keep only enabled edges # Keep only enabled edges
edges = list( edges = list(
...@@ -91,6 +92,7 @@ class MageNetworkGraphChecker(AbstractModelChecker): ...@@ -91,6 +92,7 @@ class MageNetworkGraphChecker(AbstractModelChecker):
return summary, status return summary, status
@timer
def _cycle(self, summary, status, graph): def _cycle(self, summary, status, graph):
# Keep only enabled edges # Keep only enabled edges
edges = list( edges = list(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment