コード例 #1
0
ファイル: tankcore.py プロジェクト: vascudo-dev/yandex-tank
 def job(self):
     if not self._job:
         # monitoring plugin
         monitorings = [plugin for plugin in self.plugins.values() if isinstance(plugin, MonitoringPlugin)]
         # generator plugin
         try:
             gen = self.get_plugin_of_type(GeneratorPlugin)
         except KeyError:
             logger.warning("Load generator not found")
             gen = GeneratorPlugin(self, {}, 'generator dummy')
         # aggregator
         aggregator = TankAggregator(gen)
         self._job = Job(monitoring_plugins=monitorings,
                         generator_plugin=gen,
                         aggregator=aggregator,
                         tank=socket.getfqdn())
     return self._job
コード例 #2
0
ファイル: tankcore.py プロジェクト: sabirovruslan/yandex-tank
 def job(self):
     if not self._job:
         # monitoring plugin
         try:
             mon = self.get_plugin_of_type(TelegrafPlugin)
         except KeyError:
             logger.debug("Telegraf plugin not found:", exc_info=True)
             mon = None
         # generator plugin
         try:
             gen = self.get_plugin_of_type(GeneratorPlugin)
         except KeyError:
             logger.warning("Load generator not found")
             gen = GeneratorPlugin()
         # aggregator
         aggregator = TankAggregator(gen)
         self._job = Job(monitoring_plugin=mon,
                         generator_plugin=gen,
                         aggregator=aggregator,
                         tank=socket.getfqdn())
     return self._job