Set maxHousekeepingInterval to 15 seconds.

This commit is contained in:
Piotr Szczesniak 2015-07-30 16:44:45 +02:00
parent 611b5c8bf5
commit 7e305c43f0

View File

@ -44,6 +44,8 @@ var _ Interface = new(cadvisorClient)
// TODO(vmarmol): Make configurable.
// The amount of time for which to keep stats in memory.
const statsCacheDuration = 2 * time.Minute
const maxHousekeepingInterval = 15 * time.Second
const allowDynamicHousekeeping = true
// Creates a cAdvisor and exports its API on the specified port if port > 0.
func New(port uint) (Interface, error) {
@ -53,7 +55,7 @@ func New(port uint) (Interface, error) {
}
// Create and start the cAdvisor container manager.
m, err := manager.New(memory.New(statsCacheDuration, nil), sysFs)
m, err := manager.New(memory.New(statsCacheDuration, nil), sysFs, maxHousekeepingInterval, allowDynamicHousekeeping)
if err != nil {
return nil, err
}