Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
097c8a11
Commit
097c8a11
authored
10 years ago
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(main): change pprof flag to IPFS_PROF
@jbenet @whyrusleeping thoughts?
parent
4af79b71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
cmd/ipfs/main.go
cmd/ipfs/main.go
+5
-6
No files found.
cmd/ipfs/main.go
View file @
097c8a11
...
...
@@ -35,9 +35,10 @@ var log = eventlog.Logger("cmd/ipfs")
var
errHelpRequested
=
errors
.
New
(
"Help Requested"
)
const
(
cpuProfile
=
"ipfs.cpuprof"
heapProfile
=
"ipfs.memprof"
errorFormat
=
"ERROR: %v
\n\n
"
EnvEnableProfiling
=
"IPFS_PROF"
cpuProfile
=
"ipfs.cpuprof"
heapProfile
=
"ipfs.memprof"
errorFormat
=
"ERROR: %v
\n\n
"
)
type
cmdInvocation
struct
{
...
...
@@ -512,9 +513,7 @@ func allInterruptSignals() chan os.Signal {
func
profileIfEnabled
()
(
func
(),
error
)
{
// FIXME this is a temporary hack so profiling of asynchronous operations
// works as intended.
if
u
.
GetenvBool
(
"DEBUG"
)
||
os
.
Getenv
(
"IPFS_LOGGING"
)
==
"debug"
{
u
.
Debug
=
true
u
.
SetDebugLogging
()
if
os
.
Getenv
(
EnvEnableProfiling
)
!=
""
{
stopProfilingFunc
,
err
:=
startProfiling
()
// TODO maybe change this to its own option... profiling makes it slower.
if
err
!=
nil
{
return
nil
,
err
...
...
This diff is collapsed.
Click to expand it.
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