mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-20 13:00:24 +08:00
优化代码
This commit is contained in:
@@ -122,7 +122,7 @@ func TestList_ManyItems(t *testing.T) {
|
||||
})
|
||||
list.GC(time.Now().Unix() + 1)
|
||||
t.Log("gc", count, "items")
|
||||
t.Log(time.Now().Sub(now))
|
||||
t.Log(time.Since(now))
|
||||
}
|
||||
|
||||
func TestList_Map_Performance(t *testing.T) {
|
||||
@@ -140,7 +140,7 @@ func TestList_Map_Performance(t *testing.T) {
|
||||
for i := 0; i < 100_000; i++ {
|
||||
delete(m, int64(i))
|
||||
}
|
||||
t.Log(time.Now().Sub(now))
|
||||
t.Log(time.Since(now))
|
||||
}
|
||||
|
||||
{
|
||||
@@ -153,7 +153,7 @@ func TestList_Map_Performance(t *testing.T) {
|
||||
for i := 0; i < 100_000; i++ {
|
||||
delete(m, uint64(i))
|
||||
}
|
||||
t.Log(time.Now().Sub(now))
|
||||
t.Log(time.Since(now))
|
||||
}
|
||||
|
||||
{
|
||||
@@ -166,7 +166,7 @@ func TestList_Map_Performance(t *testing.T) {
|
||||
for i := 0; i < 100_000; i++ {
|
||||
delete(m, uint32(i))
|
||||
}
|
||||
t.Log(time.Now().Sub(now))
|
||||
t.Log(time.Since(now))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user