Skip to content

Commit

Permalink
Benchmarks
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
  • Loading branch information
56quarters committed Nov 22, 2024
1 parent 52b58a4 commit ac7d058
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pkg/storage/tsdb/bucketcache/caching_bucket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1012,11 +1012,21 @@ func BenchmarkCachingKey(b *testing.B) {
cachingKeyAttributes(bucketID, "/object")
},
},
"cachingKeyAttributes() hashed": {
run: func(bucketID string) {
cachingKeyAttributes(bucketID, cachingKeyHash("/object"))
},
},
"cachingKeyObjectSubrange()": {
run: func(bucketID string) {
cachingKeyObjectSubrange(bucketID, "/object", 10, 20)
},
},
"cachingKeyObjectSubrange() hashed": {
run: func(bucketID string) {
cachingKeyObjectSubrange(bucketID, cachingKeyHash("/object"), 10, 20)
},
},
"cachingKeyIter()": {
run: func(bucketID string) {
cachingKeyIter(bucketID, "/dir")
Expand All @@ -1032,11 +1042,21 @@ func BenchmarkCachingKey(b *testing.B) {
cachingKeyExists(bucketID, "/object")
},
},
"cachingKeyExists() hashed": {
run: func(bucketID string) {
cachingKeyExists(bucketID, cachingKeyHash("/object"))
},
},
"cachingKeyContent()": {
run: func(bucketID string) {
cachingKeyContent(bucketID, "/object")
},
},
"cachingKeyContent() hashed": {
run: func(bucketID string) {
cachingKeyContent(bucketID, cachingKeyHash("/object"))
},
},
}

for testName, testData := range tests {
Expand Down

0 comments on commit ac7d058

Please sign in to comment.