Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
270d8aec
Commit
270d8aec
authored
Apr 24, 2015
by
Victor Marmol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Raise cAdvisor stats cache to 2m.
This used to be 60ns which was a bug from when we switched from number of stats to duration. Seems like the type was silently converted/ignored.
parent
0f22b6fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
cadvisor_linux.go
pkg/kubelet/cadvisor/cadvisor_linux.go
+3
-3
No files found.
pkg/kubelet/cadvisor/cadvisor_linux.go
View file @
270d8aec
...
@@ -42,8 +42,8 @@ type cadvisorClient struct {
...
@@ -42,8 +42,8 @@ type cadvisorClient struct {
var
_
Interface
=
new
(
cadvisorClient
)
var
_
Interface
=
new
(
cadvisorClient
)
// TODO(vmarmol): Make configurable.
// TODO(vmarmol): Make configurable.
// The
number of stats to keep
in memory.
// The
amount of time for which to keep stats
in memory.
const
stats
ToCache
=
60
const
stats
CacheDuration
=
2
*
time
.
Minute
// Creates a cAdvisor and exports its API on the specified port if port > 0.
// Creates a cAdvisor and exports its API on the specified port if port > 0.
func
New
(
port
uint
)
(
Interface
,
error
)
{
func
New
(
port
uint
)
(
Interface
,
error
)
{
...
@@ -53,7 +53,7 @@ func New(port uint) (Interface, error) {
...
@@ -53,7 +53,7 @@ func New(port uint) (Interface, error) {
}
}
// Create and start the cAdvisor container manager.
// Create and start the cAdvisor container manager.
m
,
err
:=
manager
.
New
(
memory
.
New
(
stats
ToCache
,
nil
),
sysFs
)
m
,
err
:=
manager
.
New
(
memory
.
New
(
stats
CacheDuration
,
nil
),
sysFs
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment