1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Fix the perf stat bytes bug

This commit is contained in:
winlin 2020-04-17 16:36:56 +08:00
parent 36d06edab3
commit e4eb501c57
5 changed files with 33 additions and 19 deletions

View file

@ -43,7 +43,9 @@ obj = json.loads(s)
print ""
p = obj['data']['dropped']
print('RTC Frame Dropped: %s%s'%(10000.0 * p['rtc_dropeed'] / p['rtc_frames'], '%%'))
print('RTC Frame Dropped: %.4f%s'%(10000.0 * p['rtc_dropeed'] / p['rtc_frames'], '%%'))
p = obj['data']['bytes']
print('Padding Overload: %.4f%s %.2fMB'%(10000.0 * p['rtc_padding'] / p['rtc_bytes'], '%%', p['rtc_padding']/1024/1024))
# 2, 3, 5, 9, 16, 32, 64, 128, 256
keys = ['lt_2', 'lt_3', 'lt_5', 'lt_9', 'lt_16', 'lt_32', 'lt_64', 'lt_128', 'lt_256', 'gt_256']