 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
+  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)")
+    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
+    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
+    // sumBenchResults.sd += results.sd
+    // sumBenchResults.median += results.median
   }
 
   print("")
-  print("Totals\(c.delim)\(SumBenchResults.description)")
+  print("Totals\(c.delim)\(sumBenchResults.description)")
 }
 
 public func main() {
   var config = TestConfig()
 
   switch (config.processArguments()) {
-    case let .Fail(msg):
+    case let .fail(msg):
       // We do this since we need an autoclosure...
       fatalError("\(msg)")
-    case .ListTests:
+    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:
+    case .run:
       config.findTestsToRun()
       printRunInfo(config)
       runBenchmarks(config)

public var registeredBenchmarks = [TestsUtils.BenchmarkInfo]()

enum TestAction {
  case Run
  case ListTests
  case Fail(String)
}

struct TestConfig {


    if let x = benchArgs.optionalArgsMap["--sleep"] {
      if x.isEmpty {
        return .fail("--sleep requires a non-empty integer value")
      }
      let v: Int? = Int(x)
      if v == nil {
        return .fail("--sleep requires a non-empty integer value")
      }
      afterRunSleep = v!
    }

    if let _ = benchArgs.optionalArgsMap["--list"] {
      return .listTests
    }

    if let _ = benchArgs.optionalArgsMap["--registered"] {
      onlyRegistered = true
    }

    return .run
  }

  mutating func findTestsToRun() {
