Remove remaining parts of samples and percentiles.
This commit is contained in:
parent
e4b28d9d78
commit
9dd8621686
@ -170,7 +170,6 @@ func getContainerInfoRequest(body io.ReadCloser) (*info.ContainerInfoRequest, er
|
|||||||
|
|
||||||
// Default stats and samples is 64.
|
// Default stats and samples is 64.
|
||||||
query.NumStats = 64
|
query.NumStats = 64
|
||||||
query.NumSamples = 64
|
|
||||||
|
|
||||||
decoder := json.NewDecoder(body)
|
decoder := json.NewDecoder(body)
|
||||||
err := decoder.Decode(&query)
|
err := decoder.Decode(&query)
|
||||||
|
@ -94,9 +94,6 @@ func TestGetMachineinfo(t *testing.T) {
|
|||||||
func TestGetContainerInfo(t *testing.T) {
|
func TestGetContainerInfo(t *testing.T) {
|
||||||
query := &info.ContainerInfoRequest{
|
query := &info.ContainerInfoRequest{
|
||||||
NumStats: 3,
|
NumStats: 3,
|
||||||
NumSamples: 2,
|
|
||||||
CpuUsagePercentiles: []int{10, 50, 90},
|
|
||||||
MemoryUsagePercentiles: []int{10, 80, 90},
|
|
||||||
}
|
}
|
||||||
containerName := "/some/container"
|
containerName := "/some/container"
|
||||||
cinfo := itest.GenerateRandomContainerInfo(containerName, 4, query, 1*time.Second)
|
cinfo := itest.GenerateRandomContainerInfo(containerName, 4, query, 1*time.Second)
|
||||||
|
@ -57,13 +57,6 @@ type ContainerReference struct {
|
|||||||
type ContainerInfoRequest struct {
|
type ContainerInfoRequest struct {
|
||||||
// Max number of stats to return.
|
// Max number of stats to return.
|
||||||
NumStats int `json:"num_stats,omitempty"`
|
NumStats int `json:"num_stats,omitempty"`
|
||||||
// Max number of samples to return.
|
|
||||||
NumSamples int `json:"num_samples,omitempty"`
|
|
||||||
|
|
||||||
// Different percentiles of CPU usage within a period. The values must be within [0, 100]
|
|
||||||
CpuUsagePercentiles []int `json:"cpu_usage_percentiles,omitempty"`
|
|
||||||
// Different percentiles of memory usage within a period. The values must be within [0, 100]
|
|
||||||
MemoryUsagePercentiles []int `json:"memory_usage_percentiles,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type ContainerInfo struct {
|
type ContainerInfo struct {
|
||||||
|
@ -122,7 +122,6 @@ func TestGetContainerInfo(t *testing.T) {
|
|||||||
|
|
||||||
query := &info.ContainerInfoRequest{
|
query := &info.ContainerInfoRequest{
|
||||||
NumStats: 256,
|
NumStats: 256,
|
||||||
NumSamples: 128,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m, infosMap, handlerMap := expectManagerWithContainers(containers, query, t)
|
m, infosMap, handlerMap := expectManagerWithContainers(containers, query, t)
|
||||||
@ -156,7 +155,6 @@ func TestSubcontainersInfo(t *testing.T) {
|
|||||||
|
|
||||||
query := &info.ContainerInfoRequest{
|
query := &info.ContainerInfoRequest{
|
||||||
NumStats: 64,
|
NumStats: 64,
|
||||||
NumSamples: 64,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m, _, _ := expectManagerWithContainers(containers, query, t)
|
m, _, _ := expectManagerWithContainers(containers, query, t)
|
||||||
|
@ -261,7 +261,6 @@ func ServerContainersPage(m manager.Manager, w http.ResponseWriter, u *url.URL)
|
|||||||
// Get the container.
|
// Get the container.
|
||||||
reqParams := info.ContainerInfoRequest{
|
reqParams := info.ContainerInfoRequest{
|
||||||
NumStats: 60,
|
NumStats: 60,
|
||||||
NumSamples: 60,
|
|
||||||
}
|
}
|
||||||
cont, err := m.GetContainerInfo(containerName, &reqParams)
|
cont, err := m.GetContainerInfo(containerName, &reqParams)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user