当前位置:网站首页>Understanding and use of tp50, tp90 and tp99
Understanding and use of tp50, tp90 and tp99
2022-04-23 06:06:00 【New ape and horse】
One TP50、TP90、TP99 The concept of
1.1 What is? TP
TP yes Top Percentile Abbreviation , Chinese translation Percentile .
1.2 What is the percentile
Percentile is a statistical term .
If you sort a set of data from small to large , And calculate the corresponding cumulative percentile , Then the value of the data corresponding to a certain percentile is called the percentile of the percentile . Can be expressed as : A group of N individual Observed value Press The number Size arrangement . Such as , be in P% The value of the position is called P Percentiles .
1.3 TP50、TP90、TP99 How to understand
TP50、TP90、TP99 Is the engineering performance index , Take the time-consuming network request as an example :
- TP50: Indicates the minimum time required to satisfy 50 percent of network requests .
- TP90: Indicates the minimum time required to satisfy 90 percent of network requests .
- TP99: Indicates the minimum time required to satisfy 99 percent of network requests .
Two TP50、TP90、TP99 The calculation of
2.1 A simple example
for instance : There are four requests that take :
10ms,1000ms,100ms,2ms
Then we can calculate TP99:4 In this request ,99% The number of requests is 4*0.99, Round up, that is 4 Time , Meet all this 4 The minimum time consumption of this request is 1000ms, That is to say TP99 The answer is 1000ms.
2.2 python Realization
Application numpy Bag percentile Method realization TP50、TP90、TP99 The calculation of .
import numpy as np
data = []
with open(' File path ', 'r') as f:
for line in f.readlines():
data.append(float(line.strip()))
print(np.percentile(data, 95))
File path : It's the absolute path , Such as /User/local/a.txt, among a.txt Is the time-consuming array of network requests .
You can put... In the code 95 Modified into 50、90、99, To achieve TP50、TP90、TP99 The calculation of .
版权声明
本文为[New ape and horse]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220533487883.html
边栏推荐
- Pytorch——数据加载和处理
- lambda expressions
- Fundamentals of SQL: first knowledge of database and SQL - installation and basic introduction - Alibaba cloud Tianchi
- 容器
- In depth source code analysis servlet first program
- 解决报错:ImportError: IProgress not found. Please update jupyter and ipywidgets
- Fundamentals of digital image processing (Gonzalez) II: gray transformation and spatial filtering
- 如何利用对比学习做无监督——[CVPR22]Deraining&[ECCV20]Image Translation
- Create binary tree
- SQL基础:初识数据库与SQL-安装与基本介绍等—阿里云天池
猜你喜欢

Pytoch -- data loading and processing

Filebrowser realizes private network disk

PyEMD安装及简单使用

Pyqt5 learning (I): Layout Management + signal and slot association + menu bar and toolbar + packaging resource package

Anaconda安装PyQt5 和 pyqt5-tools后没有出现designer.exe的问题解决

开发环境 EAS登录 license 许可修改

lambda expressions

Chapter 3 of linear algebra - Elementary Transformation of matrix and system of linear equations

Pytorch学习记录(十二):学习率衰减+正则化

PyQt5学习(一):布局管理+信号和槽关联+菜单栏与工具栏+打包资源包
随机推荐
域内用户访问域外samba服务器用户名密码错误
Pyemd installation and simple use
数据处理之Numpy常用函数表格整理
线性代数第二章-矩阵及其运算
Practical operation - Nacos installation and configuration
Postfix变成垃圾邮件中转站后的补救
Comparative study paper - [Moco, cvpr2020] momentum contract for unsupervised visual representation learning
自动控制(韩敏版)
Get the value of state in effects in DVA
字符串(String)笔记
PyQt5学习(一):布局管理+信号和槽关联+菜单栏与工具栏+打包资源包
SQL injection
Software architecture design - software architecture style
在Jupyter notebook中用matplotlib.pyplot出现服务器挂掉、崩溃的问题
sklearn之 Gaussian Processes
Multithreading and high concurrency (2) -- detailed explanation of synchronized usage
你不能访问此共享文件夹,因为你组织的安全策略阻止未经身份验证的来宾访问
Treatment of tensorflow sequelae - simple example record torch utils. data. dataset. Picture dimension problem when rewriting dataset
Pytorch notes - complete code for linear regression & manual or automatic calculation of gradient code comparison
Kingdee EAS "general ledger" system calls "de posting" button