all: remove unused code
Change-Id: I5bec6094d9dc5d16c685b8cbbecc7e1bb278fde9 Reviewed-on: https://go-review.googlesource.com/c/benchmarks/+/487775 Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org>pull/7/head
parent
439d592ebe
commit
c4c5b3d18f
|
@ -60,17 +60,6 @@ type Todo struct {
|
|||
Suites []Suite
|
||||
}
|
||||
|
||||
// The length of the path to the root of the git repo, inclusive.
|
||||
// For example, github.com/dr2chase/bent <--- bent is the repo.
|
||||
var pathLengths = map[string]int{
|
||||
"github.com": 3,
|
||||
"gitlab.com": 3,
|
||||
"zombiezen.com": 3,
|
||||
"gonum.org": 3,
|
||||
"k8s.io": 2,
|
||||
"go.uber.org": 2,
|
||||
}
|
||||
|
||||
var verbose counterFlag
|
||||
|
||||
var benchFile = "benchmarks-50.toml" // default list of benchmarks
|
||||
|
@ -722,7 +711,7 @@ results will also appear in 'bench'.
|
|||
}
|
||||
case 1: // N times, for each benchmark, shuffle configurations and build with
|
||||
permute := make([]int, len(todo.Configurations))
|
||||
for ci, _ := range todo.Configurations {
|
||||
for ci := range todo.Configurations {
|
||||
permute[ci] = ci
|
||||
}
|
||||
|
||||
|
@ -1240,11 +1229,6 @@ func mkdirAsNeeded(d string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// testBinaryName returns the name of the binary produced by "go test -c"
|
||||
func (b *Benchmark) testBinaryName() string {
|
||||
return b.Repo[strings.LastIndex(b.Repo, "/")+1:] + ".test"
|
||||
}
|
||||
|
||||
// inheritEnv extracts ev from the os environment and
|
||||
// returns env extended with that new environment variable.
|
||||
// Does not check if ev already exists in env.
|
||||
|
@ -1327,17 +1311,6 @@ func replaceEnvs(env, newevs []string) []string {
|
|||
return env
|
||||
}
|
||||
|
||||
func removeEmptyEnvs(env []string) []string {
|
||||
var newenv []string
|
||||
for _, e := range env {
|
||||
if i := strings.Index(e, "="); i == -1 || i == len(e)-1 {
|
||||
continue
|
||||
}
|
||||
newenv = append(newenv, e)
|
||||
}
|
||||
return newenv
|
||||
}
|
||||
|
||||
// ifMissingAddEnv returns a new environment derived from env
|
||||
// by adding ev=evv if env does not define env.
|
||||
func ifMissingAddEnv(env []string, ev string, evv string) []string {
|
||||
|
|
|
@ -14,9 +14,7 @@ import (
|
|||
"testing"
|
||||
)
|
||||
|
||||
const dataDir = "testdata"
|
||||
|
||||
var binary, dir string
|
||||
var dir string
|
||||
|
||||
// TestMain implemented to allow (1) alternate use as bent command itself if BENT_TEST_IS_CMD_BENT is in environment,
|
||||
// and (2) to create and remove a temporary directory for test initialization.
|
||||
|
|
|
@ -56,14 +56,6 @@ func (c *Configuration) benchName(b *Benchmark) string {
|
|||
return b.Name + "_" + c.Name
|
||||
}
|
||||
|
||||
func (c *Configuration) goCommand() string {
|
||||
gocmd := "go"
|
||||
if c.Root != "" {
|
||||
gocmd = path.Join(c.Root+"bin", gocmd)
|
||||
}
|
||||
return gocmd
|
||||
}
|
||||
|
||||
func (c *Configuration) goCommandCopy() string {
|
||||
gocmd := "go"
|
||||
if c.rootCopy != "" {
|
||||
|
@ -239,7 +231,7 @@ func (config *Configuration) compileOne(bench *Benchmark, cwd string, count int)
|
|||
}
|
||||
buf.WriteString(s)
|
||||
s = fmt.Sprintf("Benchmark%s 1 %d build-real-ns/op %d build-user-ns/op %d build-sys-ns/op\n",
|
||||
strings.Title(bench.Name), bs.RealTime.Nanoseconds(), bs.UserTime.Nanoseconds(), bs.SysTime.Nanoseconds())
|
||||
strings.Title(bench.Name), bs.RealTime.Nanoseconds(), bs.UserTime.Nanoseconds(), bs.SysTime.Nanoseconds())
|
||||
if verbose > 0 {
|
||||
fmt.Print(s)
|
||||
}
|
||||
|
|
|
@ -25,10 +25,6 @@ func main() {
|
|||
driver.Main("Garbage", benchmark)
|
||||
}
|
||||
|
||||
// func init() {
|
||||
// driver.Register("garbage", benchmark)
|
||||
// }
|
||||
|
||||
type ParsedPackage *ast.File
|
||||
|
||||
var (
|
||||
|
|
|
@ -47,10 +47,10 @@ func main() {
|
|||
log.Fatal("error: input FASTA target sequence required")
|
||||
}
|
||||
k, err := krishna.New(flag.Arg(0), tmpDir, krishna.Params{
|
||||
TmpChunkSize: 1e6,
|
||||
MinHitLen: 400,
|
||||
MinHitId: 0.94,
|
||||
TubeOffset: 0,
|
||||
TmpChunkSize: tmpChunk,
|
||||
MinHitLen: minHitLen,
|
||||
MinHitId: minId,
|
||||
TubeOffset: tubeOffset,
|
||||
AlignConc: alignconc,
|
||||
TmpConc: tmpConcurrent,
|
||||
})
|
||||
|
|
|
@ -27,7 +27,6 @@ Usage: %s put [flags]
|
|||
type putCmd struct {
|
||||
auth bootstrap.AuthOption
|
||||
force bool
|
||||
cache string
|
||||
bucket string
|
||||
assetsDir string
|
||||
assetsHashFile string
|
||||
|
|
|
@ -467,6 +467,9 @@ func mergeCPUProfiles(dir string) (string, error) {
|
|||
|
||||
out := filepath.Join(dir, "merged.cpu")
|
||||
f, err := os.Create(out)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("error creating file: %w", err)
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
if err := p.Write(f); err != nil {
|
||||
|
|
|
@ -29,7 +29,7 @@ type GVisor struct{}
|
|||
//
|
||||
// It also copies over static assets which are necessary to run the
|
||||
// benchmarks.
|
||||
func (_ GVisor) Generate(cfg *common.GenConfig) error {
|
||||
func (GVisor) Generate(cfg *common.GenConfig) error {
|
||||
goTool := *cfg.GoTool
|
||||
goTool.Env = goTool.Env.MustSet("CGO_ENABLED=0") // Disable CGO for workloads.
|
||||
|
||||
|
|
|
@ -10,6 +10,6 @@ import "golang.org/x/benchmarks/sweet/common"
|
|||
type None struct{}
|
||||
|
||||
// Generate does nothing.
|
||||
func (_ None) Generate(_ *common.GenConfig) error {
|
||||
func (None) Generate(_ *common.GenConfig) error {
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ type Tile38 struct{}
|
|||
//
|
||||
// This generator also copies over the static assets used to generate
|
||||
// the dynamic assets.
|
||||
func (_ Tile38) Generate(cfg *common.GenConfig) error {
|
||||
func (Tile38) Generate(cfg *common.GenConfig) error {
|
||||
if cfg.AssetsDir != cfg.OutputDir {
|
||||
// Copy over the datasets which are used to generate
|
||||
// the server's persistent data.
|
||||
|
|
Loading…
Reference in New Issue