benchmark_suite_test.go 485 B

1234567891011121314151617181920212223242526
  1. package benchmark
  2. import (
  3. "flag"
  4. . "github.com/onsi/ginkgo"
  5. . "github.com/onsi/gomega"
  6. "testing"
  7. )
  8. func TestBenchmark(t *testing.T) {
  9. RegisterFailHandler(Fail)
  10. RunSpecs(t, "Benchmark Suite")
  11. }
  12. var (
  13. size int // file size in MB, will be read from flags
  14. samples int // number of samples for Measure, will be read from flags
  15. )
  16. func init() {
  17. flag.IntVar(&size, "size", 50, "data length (in MB)")
  18. flag.IntVar(&samples, "samples", 6, "number of samples")
  19. flag.Parse()
  20. }