good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
github
maticnetwork
bor
Commits
c8e2b371
Commit
c8e2b371
authored
9 years ago
by
Péter Szilágyi
Browse files
Options
Downloads
Patches
Plain Diff
cmd/geth, cmd/utils: use pprof disable flag, start globally
parent
8830403a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmd/geth/main.go
+7
-5
7 additions, 5 deletions
cmd/geth/main.go
cmd/utils/flags.go
+3
-3
3 additions, 3 deletions
cmd/utils/flags.go
with
10 additions
and
8 deletions
cmd/geth/main.go
+
7
−
5
View file @
c8e2b371
...
...
@@ -245,9 +245,15 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
utils
.
LogVModuleFlag
,
utils
.
LogFileFlag
,
utils
.
LogJSONFlag
,
utils
.
PProf
En
abledFlag
,
utils
.
PProf
Dis
abledFlag
,
utils
.
PProfPortFlag
,
}
app
.
Before
=
func
(
ctx
*
cli
.
Context
)
error
{
if
!
ctx
.
GlobalBool
(
utils
.
PProfDisabledFlag
.
Name
)
{
utils
.
StartPProf
(
ctx
)
}
return
nil
}
// missing:
// flag.StringVar(&ConfigFile, "conf", defaultConfigFile, "config file")
...
...
@@ -332,10 +338,6 @@ func unlockAccount(ctx *cli.Context, am *accounts.Manager, account string) (pass
}
func
startEth
(
ctx
*
cli
.
Context
,
eth
*
eth
.
Ethereum
)
{
// Start profiling, if requested
if
ctx
.
GlobalBool
(
utils
.
PProfEnabledFlag
.
Name
)
{
utils
.
StartPProf
(
ctx
)
}
// Start Ethereum itself
utils
.
StartEthereum
(
eth
)
am
:=
eth
.
AccountManager
()
...
...
This diff is collapsed.
Click to expand it.
cmd/utils/flags.go
+
3
−
3
View file @
c8e2b371
...
...
@@ -157,9 +157,9 @@ var (
Usage
:
"When set to a file and line number holding a logging statement a stack trace will be written to the Info log"
,
Value
:
glog
.
GetTraceLocation
(),
}
PProf
En
abledFlag
=
cli
.
BoolFlag
{
Name
:
"pprof"
,
Usage
:
"Whether the profiling server
is en
abled"
,
PProf
Dis
abledFlag
=
cli
.
BoolFlag
{
Name
:
"
no
pprof"
,
Usage
:
"Whether the profiling server
should be dis
abled"
,
}
PProfPortFlag
=
cli
.
IntFlag
{
Name
:
"pprofport"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment