add nim-metrics
This commit is contained in:
parent
dc0b288085
commit
5ee668516a
|
@ -132,3 +132,8 @@
|
||||||
path = vendor/news
|
path = vendor/news
|
||||||
url = https://github.com/tormund/news
|
url = https://github.com/tormund/news
|
||||||
branch = master
|
branch = master
|
||||||
|
[submodule "vendor/nim-metrics"]
|
||||||
|
path = vendor/nim-metrics
|
||||||
|
url = https://github.com/status-im/nim-metrics.git
|
||||||
|
ignore = dirty
|
||||||
|
branch = master
|
||||||
|
|
1
nim.cfg
1
nim.cfg
|
@ -15,4 +15,5 @@
|
||||||
|
|
||||||
--threads:on
|
--threads:on
|
||||||
--excessiveStackTrace:on
|
--excessiveStackTrace:on
|
||||||
|
-d:metrics # enable metric collection
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,9 @@ proc start(): NimbusObject =
|
||||||
# periodically log internal statistics
|
# periodically log internal statistics
|
||||||
let statsInterval = 10.seconds
|
let statsInterval = 10.seconds
|
||||||
proc printStats(udata: pointer) {.closure, gcsafe.} =
|
proc printStats(udata: pointer) {.closure, gcsafe.} =
|
||||||
info "stats", nimbusStats
|
{.gcsafe.}:
|
||||||
|
let peers = peerGauge.value.int64
|
||||||
|
info "stats", peers
|
||||||
addTimer(Moment.fromNow(statsInterval), printStats)
|
addTimer(Moment.fromNow(statsInterval), printStats)
|
||||||
addTimer(Moment.fromNow(statsInterval), printStats)
|
addTimer(Moment.fromNow(statsInterval), printStats)
|
||||||
|
|
||||||
|
|
|
@ -596,14 +596,14 @@ proc setupCreate(computation: BaseComputation, memPos, len: int, value: Uint256,
|
||||||
some(computation.getFork))
|
some(computation.getFork))
|
||||||
|
|
||||||
template genCreate(callName: untyped, opCode: Op): untyped =
|
template genCreate(callName: untyped, opCode: Op): untyped =
|
||||||
op callName, inline = false, value, startPosition, size:
|
op callName, inline = false, val, startPosition, size:
|
||||||
## 0xf0, Create a new account with associated code.
|
## 0xf0, Create a new account with associated code.
|
||||||
let (memPos, len) = (startPosition.safeInt, size.safeInt)
|
let (memPos, len) = (startPosition.safeInt, size.safeInt)
|
||||||
if not computation.canTransfer(memPos, len, value, opCode):
|
if not computation.canTransfer(memPos, len, val, opCode):
|
||||||
push: 0
|
push: 0
|
||||||
return
|
return
|
||||||
|
|
||||||
var childComp = setupCreate(computation, memPos, len, value, opCode)
|
var childComp = setupCreate(computation, memPos, len, val, opCode)
|
||||||
if childComp.isNil: return
|
if childComp.isNil: return
|
||||||
|
|
||||||
continuation(childComp):
|
continuation(childComp):
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 1797b7635124875fe0e212d7df5bd1836f22cbaa
|
Subproject commit 93637fa0609129d8257adab022a3d7f1857a6516
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit bf5c678fa070c3582093b2b5785abee367c9934a
|
Loading…
Reference in New Issue