Prose\UsingSavageD::stopWatchingProcessCpu PHP Method

stopWatchingProcessCpu() public method

public stopWatchingProcessCpu ( $processName )
    public function stopWatchingProcessCpu($processName)
    {
        // what are we doing?
        $log = usingLog()->startAction("stop watch the cpu used by the '{$processName}' process on host '{$this->args[0]}'");
        // where are we doing this?
        $safeProcessName = urlencode($this->args[0] . '.processes.' . $processName);
        $url = $this->getSavagedUrl() . "/process/{$safeProcessName}/url";
        // make the request
        usingHttp()->delete($url);
        // did it work?
        $response = fromHttp()->get($url);
        expectsHttpResponse($response)->hasStatusCode(404);
        expectsHttpResponse($response)->hasBody('{"error": "no such alias"}');
        // all done
        $log->endAction();
    }