title: How do you use the benchmark flags for the go (golang) gocheck testing framework?
body: <p>How does one use the flag options for benchmarks with the <a href="https://labix.org/gocheck">gocheck</a> testing framework? In the link that I provided it seems to be that the only example they provide is by running <code>go test -check.b</code>, however, they do not provide additional comments on how it works so its hard to use it. I could not even find the -check in the go documentation when I did <code>go help test</code> nor when I did <code>go help testflag</code>. In particular I want to know how to use the benchmark testing framework better and control how long it runs for or for how many iterations it runs for etc etc. For example in the example they provide:</p>
  
  <pre><code>func (s *MySuite) BenchmarkLogic(c *C) { 
      for i := 0; i &lt; c.N; i++ { 
          // Logic to benchmark 
      } 
  }
  </code></pre>
  
  <p>There is the variable c.N. How does one specify that variable? Is it through the actual program itself or is it through go test and its flags or the command line? </p>
  
  <p>On the side note, the documentation from <code>go help testflag</code> did talk about  <code>-bench regex</code>, <code>benchmem</code> and <code>benchtime t</code> options, however, it does not talk about the <code>-check.b</code> option. However I did try to run these options as described there but it didn't really do anything I could notice. Does gocheck work with the original options for <code>go test</code>? </p>
  
  <p>The main problem I see is that there is no clear documentation for how to use the gocheck tool or its commands. I accidentally gave it a wrong flag and it threw me a error message suggesting useful commands that I need (which limited description):</p>
  
  <pre><code>  -check.b=false: Run benchmarks
    -check.btime=1s: approximate run time for each benchmark
    -check.f="": Regular expression selecting which tests and/or suites to run
    -check.list=false: List the names of all tests that will be run
    -check.v=false: Verbose mode
    -check.vv=false: Super verbose mode (disables output caching)
    -check.work=false: Display and do not remove the test working directory
    -gocheck.b=false: Run benchmarks
    -gocheck.btime=1s: approximate run time for each benchmark
    -gocheck.f="": Regular expression selecting which tests and/or suites to run
    -gocheck.list=false: List the names of all tests that will be run
    -gocheck.v=false: Verbose mode
    -gocheck.vv=false: Super verbose mode (disables output caching)
    -gocheck.work=false: Display and do not remove the test working directory
    -test.bench="": regular expression to select benchmarks to run
    -test.benchmem=false: print memory allocations for benchmarks
    -test.benchtime=1s: approximate run time for each benchmark
    -test.blockprofile="": write a goroutine blocking profile to the named file after execution
    -test.blockprofilerate=1: if &gt;= 0, calls runtime.SetBlockProfileRate()
    -test.coverprofile="": write a coverage profile to the named file after execution
    -test.cpu="": comma-separated list of number of CPUs to use for each test
    -test.cpuprofile="": write a cpu profile to the named file during execution
    -test.memprofile="": write a memory profile to the named file after execution
    -test.memprofilerate=0: if &gt;=0, sets runtime.MemProfileRate
    -test.outputdir="": directory in which to write profiles
    -test.parallel=1: maximum test parallelism
    -test.run="": regular expression to select tests and examples to run
    -test.short=false: run smaller test suite to save time
    -test.timeout=0: if positive, sets an aggregate time limit for all tests
    -test.v=false: verbose: print additional output
  </code></pre>
  
  <p>is writing wrong commands the only way to get some help with this tool? it doesn't have a help flag or something?</p>