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
00b85341
Commit
00b85341
authored
Oct 18, 2016
by
Martin Holst Swende
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: Add block processing time metric collection
parent
6952fe3a
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 @
00b85341
...
@@ -949,6 +949,7 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) {
...
@@ -949,6 +949,7 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) {
if
glog
.
V
(
logger
.
Debug
)
{
if
glog
.
V
(
logger
.
Debug
)
{
glog
.
Infof
(
"[%v] inserted block #%d (%d TXs %v G %d UNCs) (%x...). Took %v
\n
"
,
time
.
Now
()
.
UnixNano
(),
block
.
Number
(),
len
(
block
.
Transactions
()),
block
.
GasUsed
(),
len
(
block
.
Uncles
()),
block
.
Hash
()
.
Bytes
()[
0
:
4
],
time
.
Since
(
bstart
))
glog
.
Infof
(
"[%v] inserted block #%d (%d TXs %v G %d UNCs) (%x...). Took %v
\n
"
,
time
.
Now
()
.
UnixNano
(),
block
.
Number
(),
len
(
block
.
Transactions
()),
block
.
GasUsed
(),
len
(
block
.
Uncles
()),
block
.
Hash
()
.
Bytes
()[
0
:
4
],
time
.
Since
(
bstart
))
}
}
blockInsertTimer
.
UpdateSince
(
bstart
)
events
=
append
(
events
,
ChainEvent
{
block
,
block
.
Hash
(),
logs
})
events
=
append
(
events
,
ChainEvent
{
block
,
block
.
Hash
(),
logs
})
// This puts transactions in a extra db for rpc
// This puts transactions in a extra db for rpc
...
@@ -967,6 +968,7 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) {
...
@@ -967,6 +968,7 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) {
if
glog
.
V
(
logger
.
Detail
)
{
if
glog
.
V
(
logger
.
Detail
)
{
glog
.
Infof
(
"inserted forked block #%d (TD=%v) (%d TXs %d UNCs) (%x...). Took %v
\n
"
,
block
.
Number
(),
block
.
Difficulty
(),
len
(
block
.
Transactions
()),
len
(
block
.
Uncles
()),
block
.
Hash
()
.
Bytes
()[
0
:
4
],
time
.
Since
(
bstart
))
glog
.
Infof
(
"inserted forked block #%d (TD=%v) (%d TXs %d UNCs) (%x...). Took %v
\n
"
,
block
.
Number
(),
block
.
Difficulty
(),
len
(
block
.
Transactions
()),
len
(
block
.
Uncles
()),
block
.
Hash
()
.
Bytes
()[
0
:
4
],
time
.
Since
(
bstart
))
}
}
blockInsertTimer
.
UpdateSince
(
bstart
)
events
=
append
(
events
,
ChainSideEvent
{
block
,
logs
})
events
=
append
(
events
,
ChainSideEvent
{
block
,
logs
})
case
SplitStatTy
:
case
SplitStatTy
:
...
...
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