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