diff options
author | Kurkó Mihály <kurkomisi@users.noreply.github.com> | 2018-03-08 20:59:00 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-03-08 20:59:00 +0800 |
commit | 39c16c8a1e9292d26669ea4faeedc09ad4ece1ea (patch) | |
tree | e4a21ce839b3595a6afd02137388ab96c117b5e0 /vendor/github.com/syndtr/goleveldb/leveldb/db.go | |
parent | 4871e25f5fe8d58344f5267ef197662dde018d21 (diff) | |
download | go-tangerine-39c16c8a1e9292d26669ea4faeedc09ad4ece1ea.tar go-tangerine-39c16c8a1e9292d26669ea4faeedc09ad4ece1ea.tar.gz go-tangerine-39c16c8a1e9292d26669ea4faeedc09ad4ece1ea.tar.bz2 go-tangerine-39c16c8a1e9292d26669ea4faeedc09ad4ece1ea.tar.lz go-tangerine-39c16c8a1e9292d26669ea4faeedc09ad4ece1ea.tar.xz go-tangerine-39c16c8a1e9292d26669ea4faeedc09ad4ece1ea.tar.zst go-tangerine-39c16c8a1e9292d26669ea4faeedc09ad4ece1ea.zip |
cmd, ethdb, vendor: integrate leveldb iostats (#16277)
* cmd, dashboard, ethdb, vendor: send iostats to dashboard
* ethdb: change names
* ethdb: handle parsing errors
* ethdb: handle iostats syntax error
* ethdb: r -> w
Diffstat (limited to 'vendor/github.com/syndtr/goleveldb/leveldb/db.go')
-rw-r--r-- | vendor/github.com/syndtr/goleveldb/leveldb/db.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/db.go b/vendor/github.com/syndtr/goleveldb/leveldb/db.go index ea5595eb3..3655418ad 100644 --- a/vendor/github.com/syndtr/goleveldb/leveldb/db.go +++ b/vendor/github.com/syndtr/goleveldb/leveldb/db.go @@ -906,6 +906,8 @@ func (db *DB) GetSnapshot() (*Snapshot, error) { // Returns the number of files at level 'n'. // leveldb.stats // Returns statistics of the underlying DB. +// leveldb.iostats +// Returns statistics of effective disk read and write. // leveldb.writedelay // Returns cumulative write delay caused by compaction. // leveldb.sstables @@ -959,6 +961,10 @@ func (db *DB) GetProperty(name string) (value string, err error) { level, len(tables), float64(tables.size())/1048576.0, duration.Seconds(), float64(read)/1048576.0, float64(write)/1048576.0) } + case p == "iostats": + value = fmt.Sprintf("Read(MB):%.5f Write(MB):%.5f", + float64(db.s.stor.reads())/1048576.0, + float64(db.s.stor.writes())/1048576.0) case p == "writedelay": writeDelayN, writeDelay := atomic.LoadInt32(&db.cWriteDelayN), time.Duration(atomic.LoadInt64(&db.cWriteDelay)) value = fmt.Sprintf("DelayN:%d Delay:%s", writeDelayN, writeDelay) |