summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/inomap/inomap_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/internal/inomap/inomap_test.go b/internal/inomap/inomap_test.go
index 3c0ea7d..0349fd6 100644
--- a/internal/inomap/inomap_test.go
+++ b/internal/inomap/inomap_test.go
@@ -79,3 +79,22 @@ func TestTranslateStress(t *testing.T) {
t.Fail()
}
}
+
+func BenchmarkTranslateSingleDev(b *testing.B) {
+ m := New(0)
+ var q QIno
+ for n := 0; n < b.N; n++ {
+ q.Ino = uint64(n % 1000)
+ m.Translate(q)
+ }
+}
+
+func BenchmarkTranslateManyDevs(b *testing.B) {
+ m := New(0)
+ var q QIno
+ for n := 0; n < b.N; n++ {
+ q.Dev = uint64(n % 10)
+ q.Ino = uint64(n % 1000)
+ m.Translate(q)
+ }
+}