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

    var saveScheduled = false
    var terminating = false
    var shouldBeRunning = false

    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)"
        precondition(benchmarkActivity == nil)
        self.benchmarkActivity = ProcessInfo.processInfo.beginActivity(
            options: [.idleSystemSleepDisabled, .latencyCritical, .userInitiated, .automaticTerminationDisabled, .suddenTerminationDisabled],
            reason: "Running Benchmarks")
        self.harness.start(suite: suite, randomized: randomizeInputs.value)
    }

