Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
5b262ff5
Commit
5b262ff5
authored
8 years ago
by
Jeffrey Wilcke
Committed by
GitHub
8 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3156 from holiman/metrics-blocks
core: Add block processing time metric collection
parents
e8d0538a
00b85341
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
blockchain.go
core/blockchain.go
+2
-0
No files found.
core/blockchain.go
View file @
5b262ff5
...
...
@@ -953,6 +953,7 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) {
if
glog
.
V
(
logger
.
Debug
)
{
glog
.
Infof
(
"inserted block #%d [%x…] in %9v: %3d txs %7v gas %d uncles."
,
block
.
Number
(),
block
.
Hash
()
.
Bytes
()[
0
:
4
],
common
.
PrettyDuration
(
time
.
Since
(
bstart
)),
len
(
block
.
Transactions
()),
block
.
GasUsed
(),
len
(
block
.
Uncles
()))
}
blockInsertTimer
.
UpdateSince
(
bstart
)
events
=
append
(
events
,
ChainEvent
{
block
,
block
.
Hash
(),
logs
})
// This puts transactions in a extra db for rpc
...
...
@@ -971,6 +972,7 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) {
if
glog
.
V
(
logger
.
Detail
)
{
glog
.
Infof
(
"inserted forked block #%d [%x…] (TD=%v) in %9v: %3d txs %d uncles."
,
block
.
Number
(),
block
.
Hash
()
.
Bytes
()[
0
:
4
],
block
.
Difficulty
(),
common
.
PrettyDuration
(
time
.
Since
(
bstart
)),
len
(
block
.
Transactions
()),
len
(
block
.
Uncles
()))
}
blockInsertTimer
.
UpdateSince
(
bstart
)
events
=
append
(
events
,
ChainSideEvent
{
block
,
logs
})
case
SplitStatTy
:
...
...
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