diff options
author | Frédéric Guillot <fred@miniflux.net> | 2018-08-26 16:43:53 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2018-08-26 16:43:53 -0700 |
commit | a3f3f51c60e91f22cc57ecc23cf828421d46b6b7 (patch) | |
tree | e037378ae0ca1f09cfb0eb46e289f28f857c2aed /vendor/github.com/tdewolff/minify/benchmarks/html_test.go | |
parent | a9e9c347f4d385b4a297a45be96cddfc3a1c7814 (diff) |
Migrate to go modules (Go 1.11)
Diffstat (limited to 'vendor/github.com/tdewolff/minify/benchmarks/html_test.go')
-rw-r--r-- | vendor/github.com/tdewolff/minify/benchmarks/html_test.go | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/vendor/github.com/tdewolff/minify/benchmarks/html_test.go b/vendor/github.com/tdewolff/minify/benchmarks/html_test.go deleted file mode 100644 index d26b86d..0000000 --- a/vendor/github.com/tdewolff/minify/benchmarks/html_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package benchmarks - -import ( - "testing" - - "github.com/tdewolff/minify/html" -) - -var htmlSamples = []string{ - "sample_amazon.html", - "sample_bbc.html", - "sample_blogpost.html", - "sample_es6.html", - "sample_stackoverflow.html", - "sample_wikipedia.html", -} - -func init() { - for _, sample := range htmlSamples { - load(sample) - } -} - -func BenchmarkHTML(b *testing.B) { - for _, sample := range htmlSamples { - 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() - html.Minify(m, w[sample], r[sample], nil) - } - }) - } -} |