Skip to content

Commit 755a7f9

Browse files
committed
Adds benchmark for MaskAWSSensitiveValues
1 parent 42f0601 commit 755a7f9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

logging/aws_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,19 @@ func BenchmarkMaskAWSSecretKeys(b *testing.B) {
139139
dump = s
140140
}
141141

142+
func BenchmarkMaskAWSSensitiveValues(b *testing.B) {
143+
var s string
144+
b.ReportAllocs()
145+
for n := 0; n < b.N; n++ {
146+
s = MaskAWSSensitiveValues(`
147+
{
148+
"AWSSecretKey": "LEfH8nZmFN4BGIJnku6lkChHydRN5B/YlWCIjOte",
149+
"BucketName": "test-bucket",
150+
"AWSKeyId": "AIDACKCEVSQ6C2EXAMPLE",
151+
}
152+
`)
153+
}
154+
dump = s
155+
}
156+
142157
var dump string

0 commit comments

Comments
 (0)