2013-11-20 13:17:49 +00:00
|
|
|
package toolbox
|
2013-11-13 13:11:03 +00:00
|
|
|
|
|
|
|
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) {
|
2013-11-15 13:45:51 +00:00
|
|
|
StatisticsMap.AddStatistics("POST", "/api/user", "&admin.user", time.Duration(2000))
|
|
|
|
StatisticsMap.AddStatistics("POST", "/api/user", "&admin.user", time.Duration(120000))
|
|
|
|
StatisticsMap.AddStatistics("GET", "/api/user", "&admin.user", time.Duration(13000))
|
|
|
|
StatisticsMap.AddStatistics("POST", "/api/admin", "&admin.user", time.Duration(14000))
|
|
|
|
StatisticsMap.AddStatistics("POST", "/api/user/astaxie", "&admin.user", time.Duration(12000))
|
|
|
|
StatisticsMap.AddStatistics("POST", "/api/user/xiemengjun", "&admin.user", time.Duration(13000))
|
|
|
|
StatisticsMap.AddStatistics("DELETE", "/api/user", "&admin.user", time.Duration(1400))
|
2013-11-15 10:08:53 +00:00
|
|
|
StatisticsMap.GetMap(os.Stdout)
|
2013-11-13 13:11:03 +00:00
|
|
|
}
|