def test_check_enabled(self):
     instrument = _instantiate(MockInstrument)
     instrumentation.install(instrument)
     instrumentation.enable(instrument)
     assert_true(instrument_is_enabled(instrument))
     assert_true(instrument_is_enabled(instrument.name))
     instrumentation.disable(instrument)
     assert_false(instrument_is_enabled(instrument))
     assert_false(instrument_is_enabled(instrument.name))
 def test_check_enabled(self):
     instrument = _instantiate(MockInstrument)
     instrumentation.install(instrument)
     instrumentation.enable(instrument)
     assert_true(instrument_is_enabled(instrument))
     assert_true(instrument_is_enabled(instrument.name))
     instrumentation.disable(instrument)
     assert_false(instrument_is_enabled(instrument))
     assert_false(instrument_is_enabled(instrument.name))
 def initialize(self, context):
     if not pd or LooseVersion(pd.__version__) < LooseVersion('0.13.1'):
         message = ('uxperf result processor requires pandas Python package '
                    '(version 0.13.1 or higher) to be installed.\n'
                    'You can install it with pip, e.g. "sudo pip install pandas"')
         raise ResultProcessorError(message)
     if self.add_frames and not instrument_is_enabled('fps'):
         raise ConfigError('fps instrument must be enabled in order to add frames.')
Beispiel #4
0
 def initialize(self, context):
     if not pd or LooseVersion(pd.__version__) < LooseVersion('0.13.1'):
         message = (
             'uxperf result processor requires pandas Python package '
             '(version 0.13.1 or higher) to be installed.\n'
             'You can install it with pip, e.g. "sudo pip install pandas"')
         raise ResultProcessorError(message)
     if self.add_frames and not instrument_is_enabled('fps'):
         raise ConfigError(
             'fps instrument must be enabled in order to add frames.')