Files
EdgeAPI/internal/db/models/stats/traffic_hourly_stat_dao_test.go

22 lines
451 B
Go
Raw Normal View History

package stats
import (
2024-07-27 14:15:25 +08:00
"testing"
"time"
_ "github.com/go-sql-driver/mysql"
"github.com/iwind/TeaGo/dbs"
timeutil "github.com/iwind/TeaGo/utils/time"
)
func TestTrafficHourlyStatDAO_IncreaseDayBytes(t *testing.T) {
dbs.NotifyReady()
now := time.Now()
2021-09-08 17:32:08 +08:00
err := SharedTrafficHourlyStatDAO.IncreaseHourlyStat(nil, timeutil.Format("YmdH"), 1, 1, 1, 1, 1, 1)
if err != nil {
t.Fatal(err)
}
t.Log("ok", time.Since(now).Seconds()*1000, "ms")
}