Last active
June 8, 2018 08:35
-
-
Save Jguer/7ba32039e68dfb67a25f684e119eca3c to your computer and use it in GitHub Desktop.
headTohead.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package srcinfo | |
import ( | |
"os" | |
"path/filepath" | |
"testing" | |
gopkg "github.com/mikkeloscar/gopkgbuild" | |
) | |
func BenchmarkMorganaBiggest(b *testing.B) { | |
const goodPath = "testdata/srcinfos/good/" | |
files := []string{ | |
goodPath + "vlc-nightly", | |
goodPath + "asterisk", | |
goodPath + "ffmpeg-full-arm-git", | |
goodPath + "webkitgtk", | |
goodPath + "compiz-ubuntu", | |
goodPath + "parallels12-tools", | |
goodPath + "panda3d-git", | |
goodPath + "ttf-oxygen-gf", | |
goodPath + "icaclient", | |
goodPath + "plymouth", | |
} | |
for n := 0; n < b.N; n++ { | |
for _, v := range files { | |
ParseFile(v) | |
} | |
} | |
} | |
func TestMorganaBiggest(t *testing.T) { | |
const goodPath = "testdata/srcinfos/good/" | |
files := []string{ | |
goodPath + "vlc-nightly", | |
goodPath + "asterisk", | |
goodPath + "ffmpeg-full-arm-git", | |
goodPath + "webkitgtk", | |
goodPath + "compiz-ubuntu", | |
goodPath + "parallels12-tools", | |
goodPath + "panda3d-git", | |
goodPath + "ttf-oxygen-gf", | |
goodPath + "icaclient", | |
goodPath + "plymouth", | |
} | |
for _, v := range files { | |
ParseFile(v) | |
} | |
} | |
func BenchmarkMikkelBiggest(b *testing.B) { | |
const goodPath = "testdata/srcinfos/good/" | |
files := []string{ | |
goodPath + "vlc-nightly", | |
goodPath + "asterisk", | |
goodPath + "ffmpeg-full-arm-git", | |
goodPath + "webkitgtk", | |
goodPath + "compiz-ubuntu", | |
goodPath + "parallels12-tools", | |
goodPath + "panda3d-git", | |
goodPath + "ttf-oxygen-gf", | |
goodPath + "icaclient", | |
goodPath + "plymouth", | |
} | |
for n := 0; n < b.N; n++ { | |
for _, v := range files { | |
gopkg.ParseSRCINFO(v) | |
} | |
} | |
} | |
func TestMikkelBiggest(t *testing.T) { | |
const goodPath = "testdata/srcinfos/good/" | |
files := []string{ | |
goodPath + "vlc-nightly", | |
goodPath + "asterisk", | |
goodPath + "ffmpeg-full-arm-git", | |
goodPath + "webkitgtk", | |
goodPath + "compiz-ubuntu", | |
goodPath + "parallels12-tools", | |
goodPath + "panda3d-git", | |
goodPath + "ttf-oxygen-gf", | |
goodPath + "icaclient", | |
goodPath + "plymouth", | |
} | |
for _, v := range files { | |
gopkg.ParseSRCINFO(v) | |
} | |
} | |
func BenchmarkMorganaAll(b *testing.B) { | |
const goodPath = "testdata/srcinfos/good/" | |
files := []string{} | |
filepath.Walk(goodPath, func(path string, info os.FileInfo, e error) error { | |
if e != nil { | |
return e | |
} | |
files = append(files, path) | |
return nil | |
}) | |
for n := 0; n < b.N; n++ { | |
for _, v := range files { | |
ParseFile(v) | |
} | |
} | |
} | |
func TestMorganaAll(t *testing.T) { | |
const goodPath = "testdata/srcinfos/good/" | |
files := []string{} | |
filepath.Walk(goodPath, func(path string, info os.FileInfo, e error) error { | |
if e != nil { | |
return e | |
} | |
files = append(files, path) | |
return nil | |
}) | |
for _, v := range files { | |
ParseFile(v) | |
} | |
} | |
func BenchmarkMikkelAll(b *testing.B) { | |
const goodPath = "testdata/srcinfos/good/" | |
files := []string{} | |
filepath.Walk(goodPath, func(path string, info os.FileInfo, e error) error { | |
if e != nil { | |
return e | |
} | |
files = append(files, path) | |
return nil | |
}) | |
for n := 0; n < b.N; n++ { | |
for _, v := range files { | |
gopkg.ParseSRCINFO(v) | |
} | |
} | |
} | |
func TestMikkelAll(t *testing.T) { | |
const goodPath = "testdata/srcinfos/good/" | |
files := []string{} | |
filepath.Walk(goodPath, func(path string, info os.FileInfo, e error) error { | |
if e != nil { | |
return e | |
} | |
files = append(files, path) | |
return nil | |
}) | |
for _, v := range files { | |
gopkg.ParseSRCINFO(v) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment