Last active
August 29, 2015 13:59
-
-
Save nordicdyno/10856089 to your computer and use it in GitHub Desktop.
Yandex Tank minimal plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"channel": "webpush_A", "subscribe": true, "pushes": 5, "ttl": 75} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from Tank.Plugins.bfg import Sample | |
import logging | |
import time | |
import json | |
def shoot(self, missile, marker): | |
logging.debug("Missile: %s\n%s", marker, missile) | |
time.sleep(1) | |
rt = 0 | |
connect_time = 0 | |
latency = 0 | |
data_item = Sample( | |
marker, # маркер | |
1, # число активных потоков | |
rt, # время отклика (основная метрика) | |
0, # код ошибки прикладного уровня | |
0, # код ошибки сетевого уровня | |
0, # отправлено байт | |
0, # принято байт | |
connect_time, # время соединения | |
0, # время отправки | |
latency, # время от завершения отправки до начала приема | |
0, # время приема | |
0, # точность | |
) | |
return (int(time.time()), data_item) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tank] | |
plugin_phantom= | |
plugin_bfg=Tank/Plugins/BFG.py | |
rps_schedule=line(1,4,15s) | |
[bfg] | |
instances = 2 | |
threads = 4 | |
gun_type = custom | |
ammo_type = line | |
ammofile=ammo.txt | |
[custom_gun] | |
module_path = . | |
module_name = empty_shooter | |
[monitoring] | |
config=none |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment