mirror of
https://github.com/valitydev/yandex-tank.git
synced 2024-11-06 02:15:22 +00:00
Merge branch 'master' of github.com:yandex/yandex-tank into new-aggregator
This commit is contained in:
commit
cd97dcec48
@ -585,7 +585,7 @@ Example:
|
||||
user_schedule = periodic(10, 15, 100)
|
||||
shared_schedule = 0
|
||||
|
||||
Start 2 users every 0.1 seconds, maximum of 100 users. Each user will issue requests in batches of 10 requests, every 15 seconds, maximum
|
||||
Start 2 users every 0.1 seconds, 100 batches, maximum of 2 * 100 = 200 users. Each user will issue requests in batches of 10 requests, every 15 seconds, maximum
|
||||
of 100 requests. All users will read from one ammo source.
|
||||
|
||||
Second schedule type is ``linear``. It is defined like this: ``linear(<start_rps>, <end_rps>, <time>). Example:
|
||||
|
@ -650,6 +650,12 @@ class AgentWorker(Thread):
|
||||
logger.debug("str: %s" % row)
|
||||
sys.stdout.write(row + '\n')
|
||||
sys.stdout.flush()
|
||||
except IOError, e:
|
||||
if e.errno==32:
|
||||
logger.error("Broken pipe, can't send data back, terminating")
|
||||
self.finished = True
|
||||
else:
|
||||
logger.error('IOError while converting line: %s: %s', line, e)
|
||||
except Exception, e:
|
||||
logger.error('Failed to convert line %s: %s', line, e)
|
||||
|
||||
|
@ -394,7 +394,7 @@ class MonitoringCollector(object):
|
||||
listener.monitoring_data(self.send_data)
|
||||
self.send_data = ''
|
||||
|
||||
def get_host_config(self, host, names, target_hint):
|
||||
def get_host_config(self, host, target_hint):
|
||||
|
||||
default = {
|
||||
'System': 'csw,int',
|
||||
@ -406,6 +406,8 @@ class MonitoringCollector(object):
|
||||
|
||||
default_metric = ['CPU', 'Memory', 'Disk', 'Net']
|
||||
|
||||
names = defaultdict()
|
||||
|
||||
hostname = host.get('address').lower()
|
||||
if hostname == '[target]':
|
||||
if not target_hint:
|
||||
@ -492,12 +494,11 @@ class MonitoringCollector(object):
|
||||
raise RuntimeError("Can't read monitoring config %s" % filename)
|
||||
|
||||
hosts = tree.findall('Host')
|
||||
names = defaultdict()
|
||||
config = []
|
||||
|
||||
filter_obj = defaultdict(str)
|
||||
for host in hosts:
|
||||
host_config = self.get_host_config(host, names, target_hint)
|
||||
host_config = self.get_host_config(host, target_hint)
|
||||
# XXX: why stats should be separated?
|
||||
filter_obj.update(host_config.pop('stats'))
|
||||
config.append(host_config)
|
||||
|
@ -134,8 +134,12 @@ class Stairway(Composite):
|
||||
Const(minrps + i * increment, duration)
|
||||
for i in xrange(0, n_steps + 1)
|
||||
]
|
||||
if (n_steps + 1) * increment < maxrps:
|
||||
steps.append(Const(maxrps, duration))
|
||||
if increment > 0:
|
||||
if (minrps + n_steps * increment) < maxrps:
|
||||
steps.append(Const(maxrps, duration))
|
||||
elif increment < 0:
|
||||
if (minrps + n_steps * increment) > maxrps:
|
||||
steps.append(Const(maxrps, duration))
|
||||
logging.info(steps)
|
||||
super(Stairway, self).__init__(steps)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user