"""Use a dict of mock profilers here. We expect each profiler
to test their own controllers directly. """ with mock.patch( "mozperftest.profiler.PROFILERS",
{ "profiler1": mock_profiler1, "profiler2": mock_profiler2, "profiler3": mock_profiler3,
},
):
profiler = ProfilingMediator(["profiler1", "profiler2", "profiler3"])
assert len(profiler.active_profilers) == 2 assert controller1 in profiler.active_profilers assert controller2 in profiler.active_profilers assert controller3 notin profiler.active_profilers
# Test start
custom_options = "custom options here"
profiler.start(custom_options)
with mock.patch( "mozperftest.profiler.PROFILERS",
{ "profiler1": mock_profiler1, "profiler2": mock_profiler2,
},
): # Pass None to use all profilers
profiler = ProfilingMediator(None)
assert len(profiler.active_profilers) == 2 assert controller1 in profiler.active_profilers assert controller2 in profiler.active_profilers
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.