mirror of
https://github.com/valitydev/yandex-tank.git
synced 2024-11-06 18:35:18 +00:00
Refactoring monitoring
This commit is contained in:
parent
e530fb69b0
commit
1a6b3c3f99
@ -1,9 +1,9 @@
|
|||||||
from Monitoring.collector import MonitoringCollector
|
|
||||||
from Tank.Core import AbstractPlugin
|
from Tank.Core import AbstractPlugin
|
||||||
from Tank.Plugins.DataUploader import DataUploaderPlugin
|
from Tank.Plugins.DataUploader import DataUploaderPlugin
|
||||||
from Tank.Plugins.Phantom import PhantomPlugin
|
from Tank.Plugins.Phantom import PhantomPlugin
|
||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
|
from MonCollector.collector import MonitoringCollector
|
||||||
|
|
||||||
# TODO: wait for first monitoring data
|
# TODO: wait for first monitoring data
|
||||||
class MonitoringPlugin(AbstractPlugin):
|
class MonitoringPlugin(AbstractPlugin):
|
||||||
|
@ -265,7 +265,8 @@ class PhantomPlugin(AbstractPlugin):
|
|||||||
self.log.debug("stpd-hash source: %s", hashed_str)
|
self.log.debug("stpd-hash source: %s", hashed_str)
|
||||||
hasher.update(hashed_str)
|
hasher.update(hashed_str)
|
||||||
|
|
||||||
os.makedirs(self.cache_dir)
|
if not os.path.exists(self.cache_dir):
|
||||||
|
os.makedirs(self.cache_dir)
|
||||||
stpd = self.cache_dir + '/' + os.path.basename(self.ammo_file) + "_" + hasher.hexdigest() + ".stpd"
|
stpd = self.cache_dir + '/' + os.path.basename(self.ammo_file) + "_" + hasher.hexdigest() + ".stpd"
|
||||||
self.log.debug("Generated cache file name: %s", stpd)
|
self.log.debug("Generated cache file name: %s", stpd)
|
||||||
else:
|
else:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
from Monitoring.collector import MonitoringCollector
|
|
||||||
from Tests.TankTests import TankTestCase
|
from Tests.TankTests import TankTestCase
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
|
from MonCollector.collector import MonitoringCollector
|
||||||
|
|
||||||
class MonitoringCollectorTestCase(TankTestCase):
|
class MonitoringCollectorTestCase(TankTestCase):
|
||||||
data = None
|
data = None
|
||||||
|
Loading…
Reference in New Issue
Block a user