[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:
Dmitrii Stepanov 2023-02-28 14:04:02 +03:00 committed by fyrchik
parent e355e5eeba
commit 2cbc585edd
5 changed files with 8 additions and 6 deletions

View file

@ -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) {