minio / mc

Unix like utilities for object store
https://min.io/download
GNU Affero General Public License v3.0
2.86k stars 548 forks source link

Add ability to replay JSON file in scanner info #4824

Closed klauspost closed 9 months ago

klauspost commented 9 months ago

Description

Add (for now hidden) -in switch that opens a file that was output from -json and replays it.

λ mc admin scanner info -in=scanner-info.json
Scanner Activity: ∙∙●

Overall Statistics
------------------
Est. full scan time:   148d18h50m; Estimated 0.20/month
Current cycle:         5618; Started: 2024-01-06 14:14:39.745238158 +0000 UTC
Active drives:         2

Last Minute Statistics
----------------------
Objects Scanned:       402 objects; Avg: 91.974ms; Rate: 578880/day
Versions Scanned:      402 versions; Avg: 66.892µs; Rate: 578880/day
Versions Heal Checked: 0 versions; Avg: 0ms
Read Metadata:         402 objects; Avg: 91.74ms, Size: 649 bytes/obj
ILM checks:            402 versions; Avg: 1.909µs
Check Replication:     402 versions; Avg: 63.641µs
Verify Deleted:        0 folders; Avg: 0ms
Yield:                 1m13.7s total; Avg: 183.311ms/obj
------------------------------------- Currently Scanning Paths --------------------------------------
...

How to test this PR?

See above. Use mc admin scanner info -json ALIAS >scanner-info.json to generate file.

Types of changes