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
f9834e3c
Unverified
Commit
f9834e3c
authored
Feb 09, 2018
by
Shyam Jeedigunta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable symbol resolution by pprof in profile-gatherer
parent
aee2cff1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
profile_gatherer.go
test/e2e/framework/profile_gatherer.go
+10
-6
No files found.
test/e2e/framework/profile_gatherer.go
View file @
f9834e3c
...
@@ -62,10 +62,6 @@ func checkProfileGatheringPrerequisites() error {
...
@@ -62,10 +62,6 @@ func checkProfileGatheringPrerequisites() error {
}
}
func
gatherProfileOfKind
(
profileBaseName
,
kind
string
)
error
{
func
gatherProfileOfKind
(
profileBaseName
,
kind
string
)
error
{
// Check some prerequisites before gathering the profile.
if
err
:=
checkProfileGatheringPrerequisites
();
err
!=
nil
{
return
err
}
// Get the profile data over SSH.
// Get the profile data over SSH.
getCommand
:=
fmt
.
Sprintf
(
"curl -s localhost:8080/debug/pprof/%s"
,
kind
)
getCommand
:=
fmt
.
Sprintf
(
"curl -s localhost:8080/debug/pprof/%s"
,
kind
)
sshResult
,
err
:=
SSH
(
getCommand
,
GetMasterHost
()
+
":22"
,
TestContext
.
Provider
)
sshResult
,
err
:=
SSH
(
getCommand
,
GetMasterHost
()
+
":22"
,
TestContext
.
Provider
)
...
@@ -91,10 +87,10 @@ func gatherProfileOfKind(profileBaseName, kind string) error {
...
@@ -91,10 +87,10 @@ func gatherProfileOfKind(profileBaseName, kind string) error {
switch
{
switch
{
// TODO: Support other profile kinds if needed (e.g inuse_space, alloc_objects, mutex, etc)
// TODO: Support other profile kinds if needed (e.g inuse_space, alloc_objects, mutex, etc)
case
kind
==
"heap"
:
case
kind
==
"heap"
:
cmd
=
exec
.
Command
(
"go"
,
"tool"
,
"pprof"
,
"-pdf"
,
"--alloc_space"
,
tmpfile
.
Name
())
cmd
=
exec
.
Command
(
"go"
,
"tool"
,
"pprof"
,
"-pdf"
,
"-
symbolize=none"
,
"-
-alloc_space"
,
tmpfile
.
Name
())
profilePrefix
=
"ApiserverMemoryProfile_"
profilePrefix
=
"ApiserverMemoryProfile_"
case
strings
.
HasPrefix
(
kind
,
"profile"
)
:
case
strings
.
HasPrefix
(
kind
,
"profile"
)
:
cmd
=
exec
.
Command
(
"go"
,
"tool"
,
"pprof"
,
"-pdf"
,
tmpfile
.
Name
())
cmd
=
exec
.
Command
(
"go"
,
"tool"
,
"pprof"
,
"-pdf"
,
"-symbolize=none"
,
tmpfile
.
Name
())
profilePrefix
=
"ApiserverCPUProfile_"
profilePrefix
=
"ApiserverCPUProfile_"
default
:
default
:
return
fmt
.
Errorf
(
"Unknown profile kind provided: %s"
,
kind
)
return
fmt
.
Errorf
(
"Unknown profile kind provided: %s"
,
kind
)
...
@@ -141,6 +137,10 @@ func GatherApiserverCPUProfileForNSeconds(wg *sync.WaitGroup, profileBaseName st
...
@@ -141,6 +137,10 @@ func GatherApiserverCPUProfileForNSeconds(wg *sync.WaitGroup, profileBaseName st
if
wg
!=
nil
{
if
wg
!=
nil
{
defer
wg
.
Done
()
defer
wg
.
Done
()
}
}
if
err
:=
checkProfileGatheringPrerequisites
();
err
!=
nil
{
Logf
(
"Profile gathering pre-requisite failed: %v"
,
err
)
return
}
if
profileBaseName
==
""
{
if
profileBaseName
==
""
{
profileBaseName
=
time
.
Now
()
.
Format
(
time
.
RFC3339
)
profileBaseName
=
time
.
Now
()
.
Format
(
time
.
RFC3339
)
}
}
...
@@ -153,6 +153,10 @@ func GatherApiserverMemoryProfile(wg *sync.WaitGroup, profileBaseName string) {
...
@@ -153,6 +153,10 @@ func GatherApiserverMemoryProfile(wg *sync.WaitGroup, profileBaseName string) {
if
wg
!=
nil
{
if
wg
!=
nil
{
defer
wg
.
Done
()
defer
wg
.
Done
()
}
}
if
err
:=
checkProfileGatheringPrerequisites
();
err
!=
nil
{
Logf
(
"Profile gathering pre-requisite failed: %v"
,
err
)
return
}
if
profileBaseName
==
""
{
if
profileBaseName
==
""
{
profileBaseName
=
time
.
Now
()
.
Format
(
time
.
RFC3339
)
profileBaseName
=
time
.
Now
()
.
Format
(
time
.
RFC3339
)
}
}
...
...
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