public function stats(?string $id, bool $stream = false)
    {
        $url = self::$base_url.'/'.($id ?? $this->container_id).'/stats?'.http_build_query(['stream' => $stream]);

        return self::$curl->get($url);
    }
public function stats(?string $id, bool $stream = false)
    {
        $url = self::$base_url.'/'.($id ?? $this->container_id).'/stats?'.http_build_query(['stream' => $stream]);

        return self::$curl->get($url);
    }
public function stats ( ? string $ id , bool $ stream = false ) { $ url = self :: $ base_url . '/' . ( $ id ?? $ this -> container_id ) . '/stats?' . http_build_query ( [ 'stream' => $ stream ] ) ; return self :: $ curl -> get ( $ url ) ; }
Get container stats based on resource usage.

@param string|null $id
@param bool        $stream Stream the output. If false, the stats will be output once and then it will
disconnect.

@return mixed 200

@throws Exception
Get container stats based on resource usage .