# Others
s = m.add_submenu(_("More"))
s.add_handler(AnalyticsSystemEntropyHandler)
+ s.add_handler(AnalyticsSystemContextSwitchesHandler)
return m
self.render_graphs(graphs)
+class AnalyticsSystemContextSwitchesHandler(AnalyticsSystemBaseHandler):
+ url = r"/analytics/system/context-switches"
+ title = N_("Context Switches")
+
+ def get(self):
+ _ = self.locale.translate
+
+ graphs = [
+ ui.graphs.Graph(self, "context-switches"),
+ ]
+
+ self.render_graphs(graphs)
+
+
class GraphExportHandler(base.BaseHandler):
VALID_INTERVALS = ("hour", "day", "month", "week", "year")
DEFAULT_INTERVAL = "day"