Skip to content

Commit

Permalink
Add SetBytes
Browse files Browse the repository at this point in the history
  • Loading branch information
lemon-mint committed Feb 19, 2023
1 parent 6be7dd2 commit e972379
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions hashtable/table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func BenchmarkTableRead100(b *testing.B) {
for i := range keys2 {
table.Insert(keys2[i], 0)
}
b.SetBytes(int64(size2 * 10))
b.ResetTimer()
b.RunParallel(func(p *testing.PB) {
for p.Next() {
Expand All @@ -123,6 +124,7 @@ func BenchmarkSyncMapRead100(b *testing.B) {
for i := range keys2 {
table.Store(keys2[i], 0)
}
b.SetBytes(int64(size2 * 10))
b.ResetTimer()
b.RunParallel(func(p *testing.PB) {
for p.Next() {
Expand All @@ -148,6 +150,7 @@ func BenchmarkTableRead90Write10(b *testing.B) {
for i := range keys2 {
table.Insert(keys2[i], 0)
}
b.SetBytes(int64(size2 * 10))
b.ResetTimer()
b.RunParallel(func(p *testing.PB) {
for p.Next() {
Expand All @@ -173,6 +176,7 @@ func BenchmarkSyncMapRead90Write10(b *testing.B) {
for i := range keys2 {
table.Store(keys2[i], 0)
}
b.SetBytes(int64(size2 * 10))
b.ResetTimer()
b.RunParallel(func(p *testing.PB) {
for p.Next() {
Expand All @@ -198,6 +202,7 @@ func BenchmarkTableRead70Write30(b *testing.B) {
for i := range keys2 {
table.Insert(keys2[i], 0)
}
b.SetBytes(int64(size2 * 10))
b.ResetTimer()
b.RunParallel(func(p *testing.PB) {
for p.Next() {
Expand All @@ -223,6 +228,7 @@ func BenchmarkSyncMapRead70Write30(b *testing.B) {
for i := range keys2 {
table.Store(keys2[i], 0)
}
b.SetBytes(int64(size2 * 10))
b.ResetTimer()
b.RunParallel(func(p *testing.PB) {
for p.Next() {
Expand All @@ -248,6 +254,7 @@ func BenchmarkTableRead50Write50(b *testing.B) {
for i := range keys2 {
table.Insert(keys2[i], 0)
}
b.SetBytes(int64(size2 * 10))
b.ResetTimer()
b.RunParallel(func(p *testing.PB) {
for p.Next() {
Expand All @@ -273,6 +280,7 @@ func BenchmarkSyncMapRead50Write50(b *testing.B) {
for i := range keys2 {
table.Store(keys2[i], 0)
}
b.SetBytes(int64(size2 * 10))
b.ResetTimer()
b.RunParallel(func(p *testing.PB) {
for p.Next() {
Expand All @@ -298,6 +306,7 @@ func BenchmarkTableRead30Write70(b *testing.B) {
for i := range keys2 {
table.Insert(keys2[i], 0)
}
b.SetBytes(int64(size2 * 10))
b.ResetTimer()
b.RunParallel(func(p *testing.PB) {
for p.Next() {
Expand All @@ -323,6 +332,7 @@ func BenchmarkSyncMapRead30Write70(b *testing.B) {
for i := range keys2 {
table.Store(keys2[i], 0)
}
b.SetBytes(int64(size2 * 10))
b.ResetTimer()
b.RunParallel(func(p *testing.PB) {
for p.Next() {
Expand All @@ -348,6 +358,7 @@ func BenchmarkTableRead10Write90(b *testing.B) {
for i := range keys2 {
table.Insert(keys2[i], 0)
}
b.SetBytes(int64(size2 * 10))
b.ResetTimer()
b.RunParallel(func(p *testing.PB) {
for p.Next() {
Expand All @@ -373,6 +384,7 @@ func BenchmarkSyncMapRead10Write90(b *testing.B) {
for i := range keys2 {
table.Store(keys2[i], 0)
}
b.SetBytes(int64(size2 * 10))
b.ResetTimer()
b.RunParallel(func(p *testing.PB) {
for p.Next() {
Expand All @@ -398,6 +410,7 @@ func BenchmarkTableWrite100(b *testing.B) {
for i := range keys2 {
table.Insert(keys2[i], 0)
}
b.SetBytes(int64(size2 * 10))
b.ResetTimer()
b.RunParallel(func(p *testing.PB) {
for p.Next() {
Expand All @@ -423,6 +436,7 @@ func BenchmarkSyncMapWrite100(b *testing.B) {
for i := range keys2 {
table.Store(keys2[i], 0)
}
b.SetBytes(int64(size2 * 10))
b.ResetTimer()
b.RunParallel(func(p *testing.PB) {
for p.Next() {
Expand Down

0 comments on commit e972379

Please sign in to comment.