1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-21 19:30:54 +00:00
This commit is contained in:
astaxie 2016-09-13 22:43:40 +08:00
parent d5fb74aa94
commit 58ffc6f5f8
2 changed files with 11 additions and 6 deletions

View File

@ -78,13 +78,14 @@ var qpsTpl = `{{define "content"}}
{{range $i, $elem := .Content.Data}}
<tr>
{{range $elem}}
<td>
{{.}}
</td>
{{end}}
<td>{{index $elem 0}}</td>
<td>{{index $elem 1}}</td>
<td>{{index $elem 2}}</td>
<td data-order="{{index $elem 3}}">{{index $elem 4}}</td>
<td data-order="{{index $elem 5}}">{{index $elem 6}}</td>
<td data-order="{{index $elem 7}}">{{index $elem 8}}</td>
<td data-order="{{index $elem 9}}">{{index $elem 10}}</td>
</tr>
{{end}}
</tbody>

View File

@ -99,9 +99,13 @@ func (m *URLMap) GetMap() map[string]interface{} {
fmt.Sprintf("% -50s", k),
fmt.Sprintf("% -10s", kk),
fmt.Sprintf("% -16d", vv.RequestNum),
fmt.Sprintf("%d", vv.TotalTime),
fmt.Sprintf("% -16s", toS(vv.TotalTime)),
fmt.Sprintf("%d", vv.MaxTime),
fmt.Sprintf("% -16s", toS(vv.MaxTime)),
fmt.Sprintf("%d", vv.MinTime),
fmt.Sprintf("% -16s", toS(vv.MinTime)),
fmt.Sprintf("%d", time.Duration(int64(vv.TotalTime)/vv.RequestNum)),
fmt.Sprintf("% -16s", toS(time.Duration(int64(vv.TotalTime)/vv.RequestNum))),
}
resultLists = append(resultLists, result)