Skip to content

Commit

Permalink
Merge pull request #753 from fomars/develop
Browse files Browse the repository at this point in the history
netort-0.5.0
  • Loading branch information
fomars authored Jun 8, 2019
2 parents fef677f + 0111bba commit 2fc253c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='yandextank',
version='1.12.2',
version='1.12.3',
description='a performance measurement tool',
longer_description='''
Yandex.Tank is a performance measurement and load testing automatization tool.
Expand All @@ -20,7 +20,7 @@
'psutil>=1.2.1', 'requests>=2.5.1', 'paramiko>=1.16.0',
'pandas>=0.18.0', 'numpy>=1.12.1', 'future>=0.16.0',
'pip>=8.1.2',
'pyyaml>=4.2b1', 'cerberus==1.2', 'influxdb>=5.0.0', 'netort>=0.4.2',
'pyyaml>=4.2b1', 'cerberus==1.2', 'influxdb>=5.0.0', 'netort>=0.5.0',
'retrying==1.3.3', 'pytest-benchmark==3.2.2'
],
setup_requires=[
Expand Down
25 changes: 17 additions & 8 deletions yandextank/plugins/NeUploader/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@

class Plugin(AbstractPlugin, MonitoringDataListener):
SECTION = 'neuploader'
importance_high = {
'interval_real',
'proto_code',
'net_code'
}

def __init__(self, core, cfg, name):
super(Plugin, self).__init__(core, cfg, name)
Expand Down Expand Up @@ -80,13 +85,16 @@ def get_metric_obj(self, col, case):
:param case: str with case name
:return: metric object
"""

case_metrics = self.metrics_objs.get(case)
if case_metrics is None:
# parent = self.metrics_objs.get('__overall__', {}).get(col)
case_metrics = {
col: constructor(
name='{} {}'.format(col, case), raw=False, aggregate=True
name='{} {}'.format(col, case),
raw=False,
aggregate=True,
source='tank',
importance='high' if col in self.importance_high else ''
) for col, constructor in self.col_map.items()
}
self.metrics_objs[case] = case_metrics
Expand All @@ -109,9 +117,11 @@ def upload_monitoring(self, data):
for metric_name, df in self.monitoring_data_to_dfs(data).items():
if metric_name not in self.monitoring_metrics:
panel, metric = metric_name.split(':', 1)
self.monitoring_metrics[metric_name] = self.data_session.new_true_metric(metric,
group='monitoring',
host=panel)
group, name = metric.split('_', 1)
self.monitoring_metrics[metric_name] = self.data_session.new_true_metric(name,
group=group,
host=panel,
type='monitoring')
self.monitoring_metrics[metric_name].put(df)

@staticmethod
Expand Down Expand Up @@ -142,13 +152,12 @@ def filter_df_by_case(df, case):
"""
return df if case == '__overall__' else df.loc[df['tag'] == case]

@staticmethod
def map_uploader_tags(uploader_tags):
def map_uploader_tags(self, uploader_tags):
return dict(
[
('component', uploader_tags.get('component')),
('description', uploader_tags.get('job_dsc')),
('name', uploader_tags.get('job_name')),
('name', uploader_tags.get('job_name', self.cfg.get('test_name'))),
('person', uploader_tags.get('person')),
('task', uploader_tags.get('task')),
('version', uploader_tags.get('version')),
Expand Down

0 comments on commit 2fc253c

Please sign in to comment.