This repository has been archived by the owner on May 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 355
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6ea4cd1
to
502cf8b
Compare
ab7a8b8
to
a522cb5
Compare
a522cb5
to
2e89657
Compare
jomuel
reviewed
Feb 15, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build failure seems to be unrelated?
Co-authored-by: Jochen Müller <mail@jnmr.de>
karim-agha
approved these changes
Mar 1, 2021
rakita
approved these changes
Mar 1, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
jomuel
approved these changes
Mar 1, 2021
rakita
added a commit
to rakita/openethereum
that referenced
this pull request
Mar 22, 2021
This reverts commit 0fcb102.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added db metrics
To prevent a larger refactor, is decided just to keep the
KeyValueDB
name that comes fromkvdb
crate, but redefining it in the localethcore_db
KeyValueDB
now uses the internal crateethcore_db
instead the external cratekvdb
ethcore_db::KeyValueDB
is defined aspub trait KeyValueDB: kvdb::KeyValueDB + PrometheusMetrics {}
ethcore_db::KeyValueDB
traitDatabaseWithMetrics
that wrapsDatabase
and records its metrics (disk rocksdb)InMemoryWithMetrics
that wrapsInMemory
(memory db)Metrics recorded are:
kvdb_bytes_read
kvdb_bytes_written
kvdb_reads
kvdb_writes
note1: DB Row iterators are rarely used, so is not implemented doing an increment on
kv_xxx_read
counter.note2: at this moment
kvdb_reads
metrics matcheskvdb_writes
, we already detected this when implementing metrics first time in3.0.0
takingAdded metrics prefix
Now is possible to specify the metric prefix by using
--metrics-prefix=[prefix]
command line (requested by @denisgranha)PrometheusRegistry
withregister_
methods is used instead of usingprometheus_
functions withprometheus::Registry
PrometheusMetrics
trait changed to usePrometheusRegistry