MCPcopy Create free account
hub / github.com/prometheus/procfs / TestParseStatsLinux70

Function TestParseStatsLinux70

xfs/parse_test.go:1260–1278  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1258}
1259
1260func TestParseStatsLinux70(t *testing.T) {
1261 stats, err := xfs.ParseStats(strings.NewReader(linux70Stats))
1262 if err != nil {
1263 t.Fatalf("failed to parse Linux 7.0 XFS stats: %v", err)
1264 }
1265
1266 if want, got := (xfs.ZonedStats{}), stats.Zoned; want != got {
1267 t.Fatalf("unexpected zoned stats: want %+v, got %+v", want, got)
1268 }
1269 if want, got := uint32(0), stats.MetaFile.Inodes; want != got {
1270 t.Fatalf("unexpected metafile inodes: want %d, got %d", want, got)
1271 }
1272 if want, got := uint64(1), stats.DeferRelog.Count; want != got {
1273 t.Fatalf("unexpected defer_relog count: want %d, got %d", want, got)
1274 }
1275 if want, got := uint64(5113102336), stats.ExtendedPrecision.FlushBytes; want != got {
1276 t.Fatalf("unexpected xpc flush bytes: want %d, got %d", want, got)
1277 }
1278}

Callers

nothing calls this directly

Calls 1

ParseStatsFunction · 0.92

Tested by

no test coverage detected