1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-05 09:10:55 +00:00
Beego/admin/statistics_test.go

18 lines
754 B
Go

package admin
import (
"testing"
"time"
)
func TestStatics(t *testing.T) {
StatisticsMap.AddStatistics("POST", "/api/user", "&admin.user", time.Duration(1000000))
StatisticsMap.AddStatistics("POST", "/api/user", "&admin.user", time.Duration(1200000))
StatisticsMap.AddStatistics("GET", "/api/user", "&admin.user", time.Duration(1300000))
StatisticsMap.AddStatistics("POST", "/api/admin", "&admin.user", time.Duration(1400000))
StatisticsMap.AddStatistics("POST", "/api/user/astaxie", "&admin.user", time.Duration(1200000))
StatisticsMap.AddStatistics("POST", "/api/user/xiemengjun", "&admin.user", time.Duration(1300000))
StatisticsMap.AddStatistics("DELETE", "/api/user", "&admin.user", time.Duration(1400000))
s := StatisticsMap.GetMap()
}