diff --git a/src/base_parsers.rs b/src/base_parsers.rs index 1f12149..f104d5f 100644 --- a/src/base_parsers.rs +++ b/src/base_parsers.rs @@ -138,6 +138,9 @@ mod tests { fn test_param_period() { let result = param_period("exports").parse("exports.1.2.3.130@o2ib.stats=Y\n"); - assert_eq!(result, Ok((Param("exports".to_string()), "1.2.3.130@o2ib.stats=Y\n"))) + assert_eq!( + result, + Ok((Param("exports".to_string()), "1.2.3.130@o2ib.stats=Y\n")) + ) } } diff --git a/src/fixtures/valid/valid.txt b/src/fixtures/valid/valid.txt index 2984652..3f44a11 100644 --- a/src/fixtures/valid/valid.txt +++ b/src/fixtures/valid/valid.txt @@ -159,6 +159,29 @@ I/O time (1/1000s) ios % cum % | ios % cum % read | write disk I/O size ios % cum % | ios % cum % +mdt.ai400-MDT0000.exports.0@lo.uuid= +52cb8dca-ba5c-4725-9cff-41cd0d45e3e7 +ai400-MDT0000-lwp-OST0000_UUID +ai400-MDT0000-lwp-OST0001_UUID +ai400-MDT0000-lwp-MDT0000_UUID +mdt.ai400-MDT0000.exports.172.16.0.85@o2ib.uuid= +cf8d4a32-132f-48ea-9159-044a7823ca67 +ai400-MDT0000-lwp-OST0005_UUID +ai400-MDT0000-lwp-OST0004_UUID +ai400-MDT0000-lwp-MDT0002_UUID +ai400-MDT0002-mdtlov_UUID +mdt.ai400-MDT0000.exports.172.16.0.87@o2ib.uuid= +bea2448e-43cc-46da-84cd-21d8d403d44a +ai400-MDT0000-lwp-MDT0001_UUID +ai400-MDT0000-lwp-OST0003_UUID +ai400-MDT0000-lwp-OST0002_UUID +ai400-MDT0001-mdtlov_UUID +mdt.ai400-MDT0000.exports.172.16.0.89@o2ib.uuid= +115d6045-2534-4ca1-a637-0b1544ead16f +ai400-MDT0000-lwp-OST0006_UUID +ai400-MDT0000-lwp-MDT0003_UUID +ai400-MDT0000-lwp-OST0007_UUID +ai400-MDT0003-mdtlov_UUID obdfilter.ai400-OST0000.job_stats=job_stats: obdfilter.ai400-OST0001.job_stats=job_stats: obdfilter.ai400-OST0000.stats= @@ -249,28 +272,6 @@ getattr 23 samples [usecs] 2 192 629 52487 getxattr 2 samples [usecs] 18 29 47 1165 statfs 44863 samples [usecs] 0 43 323074 3055172 mdt.ai400-MDT0000.num_exports=19 -mdt.testfs-MDT0000.exports.0@lo.stats= -snapshot_time 1687448322.813894158 secs.nsecs -mdt.testfs-MDT0000.exports.1.2.3.130@o2ib.stats= -snapshot_time 1687448322.813921821 secs.nsecs -statfs 5830 samples [usecs] 2 144 63916 927644 -mdt.testfs-MDT0000.exports.1.2.3.131@o2ib.stats= -snapshot_time 1687448322.813936409 secs.nsecs -statfs 5830 samples [usecs] 0 67 25272 159582 -mdt.testfs-MDT0000.exports.1.2.3.132@o2ib.stats= -snapshot_time 1687448322.813948436 secs.nsecs -statfs 5830 samples [usecs] 0 233 30686 277350 -mdt.testfs-MDT0000.exports.1.2.3.87@o2ib.stats= -snapshot_time 1687448322.813962980 secs.nsecs -open 2049 samples [usecs] 39 1239 191256 27343170 -close 171273 samples [usecs] 6 609 3971940 128888350 -mknod 2048 samples [usecs] 35 1231 176023 24464321 -mkdir 1 samples [usecs] 431 431 431 185761 -getattr 273635 samples [usecs] 1 986 957611 12472685 -setattr 2049 samples [usecs] 16 100 74209 2940713 -getxattr 69111 samples [usecs] 6 154 933062 13781230 -statfs 6 samples [usecs] 0 33 79 1951 -sync 2048 samples [usecs] 2 477 19019 918471 ldlm.namespaces.mdt-ai400-MDT0000_UUID.contended_locks=32 ldlm.namespaces.filter-ai400-OST0000_UUID.contended_locks=32 ldlm.namespaces.filter-ai400-OST0001_UUID.contended_locks=32 diff --git a/src/snapshots/lustre_collector__parser__tests__valid_fixture_valid.txt.snap b/src/snapshots/lustre_collector__parser__tests__valid_fixture_valid.txt.snap index 499b265..448d920 100644 --- a/src/snapshots/lustre_collector__parser__tests__valid_fixture_valid.txt.snap +++ b/src/snapshots/lustre_collector__parser__tests__valid_fixture_valid.txt.snap @@ -675,6 +675,20 @@ expression: result }, ), ), + Target( + ConnectedClients( + TargetStat { + kind: Mdt, + param: Param( + "connected_clients", + ), + target: Target( + "ai400-MDT0000", + ), + value: 4, + }, + ), + ), Target( JobStatsOst( TargetStat { @@ -1895,309 +1909,6 @@ expression: result }, ), ), - Target( - ExportStats( - TargetStat { - kind: Mdt, - param: Param( - "exports", - ), - target: Target( - "testfs-MDT0000", - ), - value: [ - ExportStats { - nid: "0@lo", - stats: [], - }, - ], - }, - ), - ), - Target( - ExportStats( - TargetStat { - kind: Mdt, - param: Param( - "exports", - ), - target: Target( - "testfs-MDT0000", - ), - value: [ - ExportStats { - nid: "1.2.3.130@o2ib", - stats: [ - Stat { - name: "statfs", - units: "usecs", - samples: 5830, - min: Some( - 2, - ), - max: Some( - 144, - ), - sum: Some( - 63916, - ), - sumsquare: Some( - 927644, - ), - }, - ], - }, - ], - }, - ), - ), - Target( - ExportStats( - TargetStat { - kind: Mdt, - param: Param( - "exports", - ), - target: Target( - "testfs-MDT0000", - ), - value: [ - ExportStats { - nid: "1.2.3.131@o2ib", - stats: [ - Stat { - name: "statfs", - units: "usecs", - samples: 5830, - min: Some( - 0, - ), - max: Some( - 67, - ), - sum: Some( - 25272, - ), - sumsquare: Some( - 159582, - ), - }, - ], - }, - ], - }, - ), - ), - Target( - ExportStats( - TargetStat { - kind: Mdt, - param: Param( - "exports", - ), - target: Target( - "testfs-MDT0000", - ), - value: [ - ExportStats { - nid: "1.2.3.132@o2ib", - stats: [ - Stat { - name: "statfs", - units: "usecs", - samples: 5830, - min: Some( - 0, - ), - max: Some( - 233, - ), - sum: Some( - 30686, - ), - sumsquare: Some( - 277350, - ), - }, - ], - }, - ], - }, - ), - ), - Target( - ExportStats( - TargetStat { - kind: Mdt, - param: Param( - "exports", - ), - target: Target( - "testfs-MDT0000", - ), - value: [ - ExportStats { - nid: "1.2.3.87@o2ib", - stats: [ - Stat { - name: "open", - units: "usecs", - samples: 2049, - min: Some( - 39, - ), - max: Some( - 1239, - ), - sum: Some( - 191256, - ), - sumsquare: Some( - 27343170, - ), - }, - Stat { - name: "close", - units: "usecs", - samples: 171273, - min: Some( - 6, - ), - max: Some( - 609, - ), - sum: Some( - 3971940, - ), - sumsquare: Some( - 128888350, - ), - }, - Stat { - name: "mknod", - units: "usecs", - samples: 2048, - min: Some( - 35, - ), - max: Some( - 1231, - ), - sum: Some( - 176023, - ), - sumsquare: Some( - 24464321, - ), - }, - Stat { - name: "mkdir", - units: "usecs", - samples: 1, - min: Some( - 431, - ), - max: Some( - 431, - ), - sum: Some( - 431, - ), - sumsquare: Some( - 185761, - ), - }, - Stat { - name: "getattr", - units: "usecs", - samples: 273635, - min: Some( - 1, - ), - max: Some( - 986, - ), - sum: Some( - 957611, - ), - sumsquare: Some( - 12472685, - ), - }, - Stat { - name: "setattr", - units: "usecs", - samples: 2049, - min: Some( - 16, - ), - max: Some( - 100, - ), - sum: Some( - 74209, - ), - sumsquare: Some( - 2940713, - ), - }, - Stat { - name: "getxattr", - units: "usecs", - samples: 69111, - min: Some( - 6, - ), - max: Some( - 154, - ), - sum: Some( - 933062, - ), - sumsquare: Some( - 13781230, - ), - }, - Stat { - name: "statfs", - units: "usecs", - samples: 6, - min: Some( - 0, - ), - max: Some( - 33, - ), - sum: Some( - 79, - ), - sumsquare: Some( - 1951, - ), - }, - Stat { - name: "sync", - units: "usecs", - samples: 2048, - min: Some( - 2, - ), - max: Some( - 477, - ), - sum: Some( - 19019, - ), - sumsquare: Some( - 918471, - ), - }, - ], - }, - ], - }, - ), - ), Target( ContendedLocks( TargetStat {