Add RCAssert plugin

This commit is contained in:
Andrey Pohilko 2013-03-26 20:09:31 +04:00
parent bccfe4deb0
commit 304d043828
5 changed files with 11 additions and 7 deletions

View File

@ -11,4 +11,5 @@ plugin_web=Tank/Plugins/WebOnline.py
plugin_tips=Tank/Plugins/TipsAndTricks.py
plugin_totalautostop=Tank/Plugins/TotalAutostop.py
plugin_loadosophia=Tank/Plugins/Loadosophia.py
plugin_graphite=Tank/Plugins/GraphiteUploader.py
plugin_graphite=Tank/Plugins/GraphiteUploader.py
plugin_rcassert=Tank/Plugins/RCAssert.py

View File

@ -306,11 +306,12 @@ class AbstractReader:
def __append_sample(self, result, item):
''' add single sample to aggregator buffer '''
(marker, threads, overall_rt, http_code, net_code, sent_bytes, received_bytes, connect, send, latency, receive, accuracy) = item
for check in [threads, overall_rt, sent_bytes, received_bytes, connect, send, latency, receive, accuracy]:
for check in item:
if check < 0:
self.log.error("Problem item: %s", item)
raise ValueError("One of the sample items has negative value")
(marker, threads, overall_rt, http_code, net_code, sent_bytes, received_bytes, connect, send, latency, receive, accuracy) = item
result.case = marker
result.active_threads = threads
result.planned_requests = 0

View File

@ -15,8 +15,7 @@ import datetime
class JMeterPlugin(AbstractPlugin):
''' JMeter tank plugin '''
SECTION = 'jmeter'
SECTION = 'jmeter'
def __init__(self, core):
AbstractPlugin.__init__(self, core)
@ -38,6 +37,7 @@ class JMeterPlugin(AbstractPlugin):
def get_available_options(self):
return ["jmx", "args", "jmeter_path", ]
def configure(self):
self.original_jmx = self.get_option("jmx")
self.core.add_artifact_file(self.original_jmx, True)

4
debian/changelog vendored
View File

@ -1,8 +1,10 @@
yandex-load-tank-base (1.3.9) precise; urgency=low
* add bash completion
* add support for Loadosophia.org active tests
* add RCAssert plugin
-- Andrey Pohilko (undera) <undera@yandex-team.ru> Fri, 22 Mar 2013 17:55:21 +0400
-- Andrey Pohilko (undera) <undera@yandex-team.ru> Tue, 26 Mar 2013 19:43:07 +0400
yandex-load-tank-base (1.3.8) precise; urgency=low

View File

@ -327,7 +327,7 @@ class TankCore:
plugin = self.__get_plugin_by_key(plugin_key)
self.log.debug("Post-process %s", plugin)
try:
plugin.post_process(retcode)
retcode=plugin.post_process(retcode)
except Exception, ex:
self.log.error("Failed post-processing plugin %s: %s", plugin, ex)
self.log.debug("Failed post-processing plugin: %s", traceback.format_exc(ex))