     ]
     let maybeBenchArgs: Arguments? = parseArgs(validOptions)
     if maybeBenchArgs == nil {
-      return .Fail("Failed to parse arguments")
+      return .fail("Failed to parse arguments")
     }
     let benchArgs = maybeBenchArgs!
 
     filters = benchArgs.positionalArgs
 
     if let x = benchArgs.optionalArgsMap["--iter-scale"] {
-      if x.isEmpty { return .Fail("--iter-scale requires a value") }
+      if x.isEmpty { return .fail("--iter-scale requires a value") }
       iterationScale = Int(x)!
     }
 
     if let x = benchArgs.optionalArgsMap["--num-iters"] {
-      if x.isEmpty { return .Fail("--num-iters requires a value") }
+      if x.isEmpty { return .fail("--num-iters requires a value") }
       fixedNumIters = numericCast(Int(x)!)
     }
 
     if let x = benchArgs.optionalArgsMap["--num-samples"] {
-      if x.isEmpty { return .Fail("--num-samples requires a value") }
+      if x.isEmpty { return .fail("--num-samples requires a value") }
       numSamples = Int(x)!
     }
 

func runBenchmarks(_ c: TestConfig) {
  let units = "us"
  print("#\(c.delim)TEST\(c.delim)SAMPLES\(c.delim)MIN(\(units))\(c.delim)MAX(\(units))\(c.delim)MEAN(\(units))\(c.delim)SD(\(units))\(c.delim)MEDIAN(\(units))")
  var SumBenchResults = BenchResults()
  SumBenchResults.sampleCount = 0

  for t in c.tests {
    if !t.run {
      continue
    }
    let BenchIndex = t.index
    let BenchName = t.name
    let BenchFunc = t.f
    let results = runBench(BenchName, BenchFunc, c)
    print("\(BenchIndex)\(c.delim)\(BenchName)\(c.delim)\(results.description)")
    fflush(stdout)

    SumBenchResults.min += results.min
    SumBenchResults.max += results.max
    SumBenchResults.mean += results.mean
    SumBenchResults.sampleCount += 1
    // Don't accumulate SD and Median, as simple sum isn't valid for them.
    // TODO: Compute SD and Median for total results as well.
    // SumBenchResults.sd += results.sd
    // SumBenchResults.median += results.median
  }

  print("")
  print("Totals\(c.delim)\(SumBenchResults.description)")
}

public func main() {
  var config = TestConfig()

  switch (config.processArguments()) {
    case let .Fail(msg):
      // We do this since we need an autoclosure...
      fatalError("\(msg)")
    case .ListTests:
      config.findTestsToRun()
      print("Enabled Tests\(config.delim)Tags")
      for t in config.tests where t.run == true {
        print("\(t.name)\(config.delim)\(t.tags)")
      }
    case .Run:
      config.findTestsToRun()
      printRunInfo(config)
      runBenchmarks(config)

public var registeredBenchmarks = [TestsUtils.BenchmarkInfo]()

enum TestAction {
  case run
  case listTests
  case fail(String)
}

struct TestConfig {
