forked from TrueCloudLab/frostfs-node
[#1658] shard: Update metric counters
Use meta's operation results to change the metrics. Support typed object counters. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
ad47e2a985
commit
431e331373
6 changed files with 238 additions and 18 deletions
|
@ -312,6 +312,12 @@ func TestRefillMetabase(t *testing.T) {
|
|||
checkTombMembers(true)
|
||||
checkLocked(t, cnrLocked, locked)
|
||||
|
||||
c, err := sh.metaBase.ObjectCounters()
|
||||
require.NoError(t, err)
|
||||
|
||||
phyBefore := c.Phy()
|
||||
logicalBefore := c.Logic()
|
||||
|
||||
err = sh.Close()
|
||||
require.NoError(t, err)
|
||||
|
||||
|
@ -340,6 +346,12 @@ func TestRefillMetabase(t *testing.T) {
|
|||
err = sh.refillMetabase()
|
||||
require.NoError(t, err)
|
||||
|
||||
c, err = sh.metaBase.ObjectCounters()
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Equal(t, phyBefore, c.Phy())
|
||||
require.Equal(t, logicalBefore, c.Logic())
|
||||
|
||||
checkAllObjs(true)
|
||||
checkObj(object.AddressOf(tombObj), tombObj)
|
||||
checkTombMembers(true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue