@@ -83,23 +83,20 @@ TEST(pgmap, dump_object_stat_sum_0)
8383 pool.tier_of = 0 ;
8484 PGMap::dump_object_stat_sum (tbl, nullptr , pool_stat, avail,
8585 pool.get_size (), verbose, true , true , &pool);
86- float copies_rate =
87- (static_cast <float >(sum.num_object_copies - sum.num_objects_degraded ) /
88- sum.num_object_copies ) * pool.get_size ();
86+
8987 float used_percent = (float )statfs.allocated /
9088 (statfs.allocated + avail) * 100 ;
91- uint64_t stored = statfs.data_stored / copies_rate;
9289
9390 unsigned col = 0 ;
94- ASSERT_EQ (stringify (byte_u_t (stored )), tbl.get (0 , col++));
95- ASSERT_EQ (stringify (byte_u_t (stored )), tbl.get (0 , col++));
91+ ASSERT_EQ (stringify (byte_u_t (statfs. data_stored /pool. get_size () )), tbl.get (0 , col++));
92+ ASSERT_EQ (stringify (byte_u_t (statfs. data_stored /pool. get_size () )), tbl.get (0 , col++));
9693 ASSERT_EQ (stringify (byte_u_t (0 )), tbl.get (0 , col++));
9794 ASSERT_EQ (stringify (si_u_t (sum.num_objects )), tbl.get (0 , col++));
9895 ASSERT_EQ (stringify (byte_u_t (statfs.allocated )), tbl.get (0 , col++));
9996 ASSERT_EQ (stringify (byte_u_t (statfs.allocated )), tbl.get (0 , col++));
10097 ASSERT_EQ (stringify (byte_u_t (0 )), tbl.get (0 , col++));
10198 ASSERT_EQ (percentify (used_percent), tbl.get (0 , col++));
102- ASSERT_EQ (stringify (byte_u_t (avail/copies_rate )), tbl.get (0 , col++));
99+ ASSERT_EQ (stringify (byte_u_t (avail/pool. get_size () )), tbl.get (0 , col++));
103100 ASSERT_EQ (stringify (si_u_t (pool.quota_max_objects )), tbl.get (0 , col++));
104101 ASSERT_EQ (stringify (byte_u_t (pool.quota_max_bytes )), tbl.get (0 , col++));
105102 ASSERT_EQ (stringify (si_u_t (sum.num_objects_dirty )), tbl.get (0 , col++));
0 commit comments