1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

First commit

This commit is contained in:
Frédéric Guillot 2017-11-19 21:10:04 -08:00
commit 8ffb773f43
2121 changed files with 1118910 additions and 0 deletions

View file

@ -0,0 +1,32 @@
package benchmarks
import (
"testing"
"github.com/tdewolff/minify/css"
)
var cssSamples = []string{
"sample_bootstrap.css",
"sample_gumby.css",
}
func init() {
for _, sample := range cssSamples {
load(sample)
}
}
func BenchmarkCSS(b *testing.B) {
for _, sample := range cssSamples {
b.Run(sample, func(b *testing.B) {
b.SetBytes(int64(r[sample].Len()))
for i := 0; i < b.N; i++ {
r[sample].Reset()
w[sample].Reset()
css.Minify(m, w[sample], r[sample], nil)
}
})
}
}