add performance testing result

This commit is contained in:
John
2020-04-23 17:14:11 +08:00
parent 71b1f00dc5
commit 9e38b2cb90
2 changed files with 37 additions and 5 deletions

View File

@ -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))
}

View File

@ -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