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

21 lines
434 B
Go
Raw Normal View History

package models
import (
_ "github.com/go-sql-driver/mysql"
"github.com/iwind/TeaGo/dbs"
timeutil "github.com/iwind/TeaGo/utils/time"
"testing"
"time"
)
func TestTrafficHourlyStatDAO_IncreaseDayBytes(t *testing.T) {
dbs.NotifyReady()
now := time.Now()
err := SharedTrafficHourlyStatDAO.IncreaseDayBytes(nil, timeutil.Format("YmdH"), 1)
if err != nil {
t.Fatal(err)
}
t.Log("ok", time.Since(now).Seconds()*1000, "ms")
}