This repository has been archived on 2024-10-02. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
ltc/lts_test.go

25 lines
448 B
Go

package main
import "testing"
func BenchmarkSRTContent_String(b *testing.B) {
srt := SRTContent{
Index: 10,
Start: 100,
End: 200,
Text: "言语 不起作用,想看到 具体行动",
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
_ = srt.String()
}
}
func BenchmarkLrc2Srt(b *testing.B) {
id := "28891491"
lyric, lyricT := Get163Lyric(id)
b.ResetTimer()
for i := 0; i < b.N; i++ {
_, _ = Lrc2Srt(lyric), Lrc2Srt(lyricT)
}
}