From d8d42512c15b32a9013938018cdc0f441561944e Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Wed, 15 Jan 2020 13:41:15 +0100 Subject: v2: stats: drop redundant sleep when streaming Also remove the redundant stats handler in libpod. Signed-off-by: Valentin Rothberg --- pkg/api/handlers/generic/containers_stats.go | 1 - pkg/api/handlers/libpod/containers.go | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'pkg/api') diff --git a/pkg/api/handlers/generic/containers_stats.go b/pkg/api/handlers/generic/containers_stats.go index 4fb856bdb..26c8efa15 100644 --- a/pkg/api/handlers/generic/containers_stats.go +++ b/pkg/api/handlers/generic/containers_stats.go @@ -76,7 +76,6 @@ func StatsContainer(w http.ResponseWriter, r *http.Request) { OnlineCPUs: 0, ThrottlingData: docker.ThrottlingData{}, } - time.Sleep(DefaultStatsPeriod) } for ok := true; ok; ok = query.Stream { diff --git a/pkg/api/handlers/libpod/containers.go b/pkg/api/handlers/libpod/containers.go index bfb028b1b..ceb7460da 100644 --- a/pkg/api/handlers/libpod/containers.go +++ b/pkg/api/handlers/libpod/containers.go @@ -143,9 +143,7 @@ func LogsFromContainer(w http.ResponseWriter, r *http.Request) { // timestamps // tail string } -func StatsContainer(w http.ResponseWriter, r *http.Request) { - //stream -} + func CreateContainer(w http.ResponseWriter, r *http.Request) { } -- cgit v1.2.3-54-g00ecf