mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-23 15:10:25 +08:00
执行定时任务时自动根据负载进行延后执行
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
fsutils "github.com/TeaOSLab/EdgeNode/internal/utils/fs"
|
||||
"github.com/iwind/TeaGo/assert"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestWrites(t *testing.T) {
|
||||
@@ -20,6 +21,10 @@ func TestWrites(t *testing.T) {
|
||||
a.IsTrue(fsutils.WriteReady())
|
||||
}
|
||||
|
||||
func TestWaitLoad(t *testing.T) {
|
||||
fsutils.WaitLoad(100, 1, 1 * time.Minute)
|
||||
}
|
||||
|
||||
func BenchmarkWrites(b *testing.B) {
|
||||
b.RunParallel(func(pb *testing.PB) {
|
||||
for pb.Next() {
|
||||
|
||||
Reference in New Issue
Block a user