Endpoint to expose interfaces' statistics

Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
Alessandro Boch
2015-06-29 13:32:07 -07:00
parent d68e862b5e
commit 6b80e22053
5 changed files with 140 additions and 0 deletions
+9
View File
@@ -1042,6 +1042,15 @@ func TestEndpointJoin(t *testing.T) {
t.Fatalf("Endpoint ContainerInfo returned unexpected id: %s", ep1.ContainerInfo().ID())
}
// Attempt retrieval of endpoint interfaces statistics
stats, err := ep1.Statistics()
if err != nil {
t.Fatal(err)
}
if _, ok := stats["eth0"]; !ok {
t.Fatalf("Did not find eth0 statistics")
}
// Now test the container joining another network
n2, err := createTestNetwork(bridgeNetType, "testnetwork2",
options.Generic{