Skip to content

Commit d7b19aa

Browse files
committed
add benchmark func for GitHubEmojiLink
1 parent accf557 commit d7b19aa

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ copy: build
66
test:
77
go test ./...
88
benchmark:
9-
go test -benchmem -run=^$$ -bench ^BenchmarkGetTopN$$ github.com/linuxsuren/yaml-readme/function
9+
go test -benchmem -run=^$$ -bench ^*$$ github.com/linuxsuren/yaml-readme/function

function/github_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,3 +418,9 @@ func BenchmarkGetTopN(b *testing.B) {
418418
getTopN(items, 3)
419419
}
420420
}
421+
422+
func BenchmarkGitHubEmojiLink(b *testing.B) {
423+
for i := 0; i < b.N; i++ {
424+
GitHubEmojiLink("linuxsuren")
425+
}
426+
}

0 commit comments

Comments
 (0)