forked from TrueCloudLab/frostfs-sdk-go
[TrueCloudLab/hrw#2] sdk-go: Use typed HRW methods
Update HRW pkg and use typed HRW methods to sort nodes Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
e355e5eeba
commit
2cbc585edd
5 changed files with 8 additions and 6 deletions
|
@ -50,7 +50,7 @@ func BenchmarkHRWSort(b *testing.B) {
|
|||
copy(realNodes, vectors)
|
||||
b.StartTimer()
|
||||
|
||||
hrw.SortSliceByValue(realNodes, pivot)
|
||||
hrw.SortHasherSliceByValue(realNodes, pivot)
|
||||
}
|
||||
})
|
||||
b.Run("only sort by index", func(b *testing.B) {
|
||||
|
@ -72,7 +72,7 @@ func BenchmarkHRWSort(b *testing.B) {
|
|||
copy(realNodes, vectors)
|
||||
b.StartTimer()
|
||||
|
||||
hrw.SortSliceByWeightValue(realNodes, weights, pivot)
|
||||
hrw.SortHasherSliceByWeightValue(realNodes, weights, pivot)
|
||||
}
|
||||
})
|
||||
b.Run("sort by ID, then by index (deterministic)", func(b *testing.B) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue