Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Update analysis_kpis.py #52

Merged
merged 4 commits into from
Jun 15, 2018
Merged

Update analysis_kpis.py #52

merged 4 commits into from
Jun 15, 2018

Conversation

guochaorong
Copy link
Collaborator

No description provided.

analysis_kpis.py Outdated
@@ -49,12 +49,12 @@ def print_result(self):
suc = True
for kpi_name in self.analysis_result.keys():
is_actived = self.kpis_status[kpi_name]
log.warn('kpi: %s, actived: %s' % (kpi_name, is_actived))
log.warn('****** kpi: %s, actived: %s ******' % (kpi_name, is_actived))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too ugly.

弄一个函数,把这些特殊的输出标准化一些,不然那容易一个用5个*,一个用6个*,不标准

包括下面的 !!!!! 看起来会比较奇怪,统一到函数里。

或者用文字前缀,比如 NOTE ... 或者 DANGER ...

analysis_kpis.py Outdated
@@ -53,8 +53,8 @@ def print_result(self):
if is_actived:
if self.analysis_result[kpi_name]['change_rate'] > self.diff_thre:
suc = False
print("kpi: %s change_tate too bigger !!!!!!!!!!" % kpi_name)
print('min:%s max:%s mean:%s median:%s std:%s change_rate:%s' %
print("NOTE kpi: %s change_rate too bigger!" % kpi_name)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log.warn here ?

Copy link
Collaborator

@Superjomn Superjomn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

确认 log level = info

@guochaorong
Copy link
Collaborator Author

恩恩, 设置了级别logging.INFO , test 符合期望

@guochaorong guochaorong merged commit 3943d4e into develop Jun 15, 2018
@guochaorong guochaorong deleted the guochaorong-patch-2 branch June 23, 2018 02:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants