Skip to content

Commit

Permalink
对延迟100以下IP进行排序
Browse files Browse the repository at this point in the history
  • Loading branch information
miyouzi committed Jul 20, 2019
1 parent 04ac36a commit c1a39cf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions akamTester.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def ping_test(ip):

if len(good_ips) > 0:
color_print('基于当前网络环境, 以下为延迟低于100ms的IP', status=2)
good_ips.sort(key=lambda x:x['delay'])
for ip in good_ips:
color_print(ip['ip'] + ' 平均延迟: ' + str(ip['delay']) + ' ms', status=2)
else:
Expand Down

0 comments on commit c1a39cf

Please sign in to comment.