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

19 lines
764 B
Go
Raw Normal View History

package admin
import (
2013-11-15 10:08:53 +00:00
"os"
"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))
2013-11-15 10:08:53 +00:00
StatisticsMap.GetMap(os.Stdout)
}