|
@@ -60,7 +60,7 @@ func BenchmarkUpdate(b *testing.B) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- b.Run(fmt.Sprintf("Insert100Loc@%d", size), func(b *testing.B) {
|
|
|
+ b.Run(fmt.Sprintf("n=Insert100Loc/size=%d", size), func(b *testing.B) {
|
|
|
for range b.N {
|
|
|
for i := range fs {
|
|
|
fs[i] = genFile(rand.String(24), 64, 0)
|
|
@@ -72,7 +72,7 @@ func BenchmarkUpdate(b *testing.B) {
|
|
|
b.ReportMetric(float64(b.N)*100.0/b.Elapsed().Seconds(), "files/s")
|
|
|
})
|
|
|
|
|
|
- b.Run(fmt.Sprintf("RepBlocks100@%d", size), func(b *testing.B) {
|
|
|
+ b.Run(fmt.Sprintf("n=RepBlocks100/size=%d", size), func(b *testing.B) {
|
|
|
for range b.N {
|
|
|
for i := range fs {
|
|
|
fs[i].Blocks = genBlocks(fs[i].Name, seed, 64)
|
|
@@ -86,7 +86,7 @@ func BenchmarkUpdate(b *testing.B) {
|
|
|
b.ReportMetric(float64(b.N)*100.0/b.Elapsed().Seconds(), "files/s")
|
|
|
})
|
|
|
|
|
|
- b.Run(fmt.Sprintf("RepSame100@%d", size), func(b *testing.B) {
|
|
|
+ b.Run(fmt.Sprintf("n=RepSame100/size=%d", size), func(b *testing.B) {
|
|
|
for range b.N {
|
|
|
for i := range fs {
|
|
|
fs[i].Version = fs[i].Version.Update(42)
|
|
@@ -98,7 +98,7 @@ func BenchmarkUpdate(b *testing.B) {
|
|
|
b.ReportMetric(float64(b.N)*100.0/b.Elapsed().Seconds(), "files/s")
|
|
|
})
|
|
|
|
|
|
- b.Run(fmt.Sprintf("Insert100Rem@%d", size), func(b *testing.B) {
|
|
|
+ b.Run(fmt.Sprintf("n=Insert100Rem/size=%d", size), func(b *testing.B) {
|
|
|
for range b.N {
|
|
|
for i := range fs {
|
|
|
fs[i].Blocks = genBlocks(fs[i].Name, seed, 64)
|
|
@@ -112,7 +112,7 @@ func BenchmarkUpdate(b *testing.B) {
|
|
|
b.ReportMetric(float64(b.N)*100.0/b.Elapsed().Seconds(), "files/s")
|
|
|
})
|
|
|
|
|
|
- b.Run(fmt.Sprintf("GetGlobal100@%d", size), func(b *testing.B) {
|
|
|
+ b.Run(fmt.Sprintf("n=GetGlobal100/size=%d", size), func(b *testing.B) {
|
|
|
for range b.N {
|
|
|
for i := range fs {
|
|
|
_, ok, err := db.GetGlobalFile(folderID, fs[i].Name)
|
|
@@ -127,7 +127,7 @@ func BenchmarkUpdate(b *testing.B) {
|
|
|
b.ReportMetric(float64(b.N)*100.0/b.Elapsed().Seconds(), "files/s")
|
|
|
})
|
|
|
|
|
|
- b.Run(fmt.Sprintf("LocalSequenced@%d", size), func(b *testing.B) {
|
|
|
+ b.Run(fmt.Sprintf("n=LocalSequenced/size=%d", size), func(b *testing.B) {
|
|
|
count := 0
|
|
|
for range b.N {
|
|
|
cur, err := db.GetDeviceSequence(folderID, protocol.LocalDeviceID)
|
|
@@ -146,7 +146,7 @@ func BenchmarkUpdate(b *testing.B) {
|
|
|
b.ReportMetric(float64(count)/b.Elapsed().Seconds(), "files/s")
|
|
|
})
|
|
|
|
|
|
- b.Run(fmt.Sprintf("GetDeviceSequenceLoc@%d", size), func(b *testing.B) {
|
|
|
+ b.Run(fmt.Sprintf("n=GetDeviceSequenceLoc/size=%d", size), func(b *testing.B) {
|
|
|
for range b.N {
|
|
|
_, err := db.GetDeviceSequence(folderID, protocol.LocalDeviceID)
|
|
|
if err != nil {
|
|
@@ -154,7 +154,7 @@ func BenchmarkUpdate(b *testing.B) {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- b.Run(fmt.Sprintf("GetDeviceSequenceRem@%d", size), func(b *testing.B) {
|
|
|
+ b.Run(fmt.Sprintf("n=GetDeviceSequenceRem/size=%d", size), func(b *testing.B) {
|
|
|
for range b.N {
|
|
|
_, err := db.GetDeviceSequence(folderID, protocol.DeviceID{42})
|
|
|
if err != nil {
|
|
@@ -163,7 +163,7 @@ func BenchmarkUpdate(b *testing.B) {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
- b.Run(fmt.Sprintf("RemoteNeed@%d", size), func(b *testing.B) {
|
|
|
+ b.Run(fmt.Sprintf("n=RemoteNeed/size=%d", size), func(b *testing.B) {
|
|
|
count := 0
|
|
|
for range b.N {
|
|
|
it, errFn := db.AllNeededGlobalFiles(folderID, protocol.DeviceID{42}, config.PullOrderAlphabetic, 0, 0)
|
|
@@ -178,7 +178,7 @@ func BenchmarkUpdate(b *testing.B) {
|
|
|
b.ReportMetric(float64(count)/b.Elapsed().Seconds(), "files/s")
|
|
|
})
|
|
|
|
|
|
- b.Run(fmt.Sprintf("LocalNeed100Largest@%d", size), func(b *testing.B) {
|
|
|
+ b.Run(fmt.Sprintf("n=LocalNeed100Largest/size=%d", size), func(b *testing.B) {
|
|
|
count := 0
|
|
|
for range b.N {
|
|
|
it, errFn := db.AllNeededGlobalFiles(folderID, protocol.LocalDeviceID, config.PullOrderLargestFirst, 100, 0)
|