中文 | English
A simple api record tool
- Fast
- Lightweight
- Single file
- Persistence
Just download the executable file and run it directly
address: 127.0.0.1:8000/api
method: POST
params:
{
"app": "test1"
}
Sample returns:
{
"code": 0,
"msg": "success",
"data": "Add app success"
}
address: 127.0.0.1:8000/api/test1
method: POST
params:
{
"api": "ttt1"
}
Sample returns:
{
"code": 0,
"msg": "success",
"data": "Success"
}
address: 127.0.0.1:8000/api/test1/ttt1
method: POST
params: None
Sample returns:
{
"code": 0,
"msg": "success",
"data": 2498788
}
address: 127.0.0.1:8000/api/test1/ttt1
method: GET
params: None
Sample returns:
{
"code": 0,
"msg": "success",
"data": 2498788
}
address: 127.0.0.1:8000/api/test1
method: GET
params:
{
"limit": 2,
"sort": true,
"apis": ["ttt1", "ttt2"]
}
- limit: Limit the number of return items
- sort: Sort or not
- apis: Specify the api to be returned
Sample returns:
{
"code": 0,
"msg": "success",
"data": {
"total": 2498788,
"apis": [
{
"api": "ttt1",
"count": 2498788
},
{
"api": "ttt2",
"count": 0
}
]
}
}
server_name = "apirec"
port = 8000
log_level = "info"
# day, hour, minute
log_split = "day"
# Sync interval (sec)
sync_interval = 30
No suitable test method has been found, and the results on my laptop so far are as follows
- CPU 12th Gen Intel(R) Core(TM) i7-1255U
- Memory 16G 4267MHz LPDDR4x
.\rsb.exe -l -m POST -d 10 http://127.0.0.1:8000/api/test1/ttt1
Post "http://127.0.0.1:8000/api/test1/ttt1" with for 10s using 50 connections
▪▪▪▪▪ [00:00:10] [####################] 10s/10s (100%)
Statistics Avg Stdev Max
Reqs/sec 86257.56 1482.19 88056.00
Latency 575.64µs 148.94µs 4.09ms
Latency Distribution
50% 460.55µs
75% 510.74µs
90% 543.59µs
99% 570.45µs
HTTP codes:
1XX - 0, 2XX - 859995, 3XX - 0, 4XX - 0, 5XX - 0
others - 0
Throughput: 86859.69/s
Average of 8.6 million requests per second
MIT License