Skip to content

testing: align package duration values #15944

@mdwhatcott

Description

@mdwhatcott
  1. What version of Go am I using?

go version go1.6.2 darwin/amd64

  1. What operating system and processor architecture am I using?
GOARCH="amd64"
GOOS="darwin"
  1. What did I do?
$ go get github.com/smartystreets/gunit
$ cd $GOPATH/src/github.com/smartystreets/gunit
$ go test ./...
  1. What did I want to see?
ok      0.007s  github.com/smartystreets/gunit
ok      0.006s  github.com/smartystreets/gunit/advanced_examples
ok      0.009s  github.com/smartystreets/gunit/basic_examples
?               github.com/smartystreets/gunit/gunit [no test files]
ok      0.011s  github.com/smartystreets/gunit/gunit/generate
ok      0.008s  github.com/smartystreets/gunit/gunit/parse
  1. What did I see instead?
ok      github.com/smartystreets/gunit  0.007s
ok      github.com/smartystreets/gunit/advanced_examples    0.006s
ok      github.com/smartystreets/gunit/basic_examples   0.009s
?       github.com/smartystreets/gunit/gunit    [no test files]
ok      github.com/smartystreets/gunit/gunit/generate   0.011s
ok      github.com/smartystreets/gunit/gunit/parse  0.008s

In the spirit of #10594 I propose that the duration of each package be aligned vertically for ease of comparison and to make sorting by duration a more obvious option:

$ go test ./... | egrep "\?|ok|FAIL" | sort -k2
?               github.com/smartystreets/gunit/gunit [no test files]
ok      0.006s  github.com/smartystreets/gunit/advanced_examples
ok      0.007s  github.com/smartystreets/gunit
ok      0.008s  github.com/smartystreets/gunit/gunit/parse
ok      0.009s  github.com/smartystreets/gunit/basic_examples
ok      0.011s  github.com/smartystreets/gunit/gunit/generate

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions