1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-18 10:20:56 +00:00
Beego/admin/statistics_test.go
2013-11-15 18:08:53 +08:00

19 lines
764 B
Go

package admin
import (
"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))
StatisticsMap.GetMap(os.Stdout)
}