mirror of
https://gitee.com/johng/gf
synced 2026-06-06 16:21:40 +08:00
add performance testing result
This commit is contained in:
@ -1,13 +1,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"github.com/gogf/gf/text/gstr"
|
||||
)
|
||||
|
||||
func main() {
|
||||
filename := "FDJT02·WS·2013·DQ·D30·0002-11"
|
||||
fmt.Println(len(filename))
|
||||
fmt.Println(gstr.RuneLen(filename)) //值是29
|
||||
fmt.Println(gstr.SubStrRune(filename, 0, 26))
|
||||
b := []byte{3, 0, 0}
|
||||
fmt.Println(string(b))
|
||||
fmt.Println(hex.EncodeToString(b))
|
||||
}
|
||||
|
||||
33
README.MD
33
README.MD
@ -48,6 +48,39 @@ golang version >= 1.13
|
||||
<img src="https://goframe.org/images/arch.png?v=11"/>
|
||||
</div>
|
||||
|
||||
# Performance
|
||||
|
||||
> Run `5` times for each case of each project and pick up the best testing result.
|
||||
|
||||
Performance testing cases source codes are hosted at: https://github.com/gogf/gf-performance
|
||||
|
||||
## 1. Hello World
|
||||
<table>
|
||||
<tr>
|
||||
<th>Throughputs</th>
|
||||
<th>Mean Latency</th>
|
||||
<th>P99 Latency</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30%"><img src="http://gfcdn.johng.cn/images/performance/throughputs1.jpeg"></td>
|
||||
<td width="30%"><img src="http://gfcdn.johng.cn/images/performance/meanlatency1.jpeg"></td>
|
||||
<td width="30%"><img src="http://gfcdn.johng.cn/images/performance/p99latency1.jpeg"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## 2. JSON Response.
|
||||
<table>
|
||||
<tr>
|
||||
<th>Throughputs</th>
|
||||
<th>Mean Latency</th>
|
||||
<th>P99 Latency</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30%"><img src="http://gfcdn.johng.cn/images/performance/throughputs3.jpeg"></td>
|
||||
<td width="30%"><img src="http://gfcdn.johng.cn/images/performance/meanlatency3.jpeg"></td>
|
||||
<td width="30%"><img src="http://gfcdn.johng.cn/images/performance/p99latency3.jpeg"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
# License
|
||||
|
||||
|
||||
Reference in New Issue
Block a user