     var saveScheduled = false
     var terminating = false
     var shouldBeRunning = false
+    var benchmarkActivity: NSObjectProtocol? = nil
 
     let logarithmicSizeScale: AnyUpdatableValue<Bool> = UserDefaults.standard.glue.updatable(forKey: "LogarithmicSize", defaultValue: true)
     let logarithmicTimeScale: AnyUpdatableValue<Bool> = UserDefaults.standard.glue.updatable(forKey: "LogarithmicTime", defaultValue: true)

        self.runButton.image = #imageLiteral(resourceName: "StopTemplate")
        self.startMenuItem.title = "Stop Running"
        self.status = "Running \(suite.title)"
        self.harness.start(suite: suite, randomized: randomizeInputs.value)
    }



    func harnessDidStopRunning(_ harness: Harness) {
        self.save()
        ProcessInfo.processInfo.endActivity(benchmarkActivity!)
        benchmarkActivity = nil
        if terminating {
            NSApp.reply(toApplicationShouldTerminate: true)
        }
