Skip to content

Instantly share code, notes, and snippets.

@Jguer
Last active June 8, 2018 08:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jguer/7ba32039e68dfb67a25f684e119eca3c to your computer and use it in GitHub Desktop.
Save Jguer/7ba32039e68dfb67a25f684e119eca3c to your computer and use it in GitHub Desktop.
headTohead.go
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