8000 Add -stats: inventory counts and runtime timings · Issue #19 · dominikzorgnotti/esx-hcl-check · GitHub
[go: up one dir, main page]

Skip to content

Add -stats: inventory counts and runtime timings #19

Closed

Description

@dominikzorgnotti

Summary

Now that v0.3.1 adds performance work (cross-host query dedup #15, bounded concurrency #17), we need a way to measure it. Add a -stats flag that emits inventory counts and runtime timings.

Output shape

JSON (-json -stats): a new top-level stats key next to results and issues:

{
  "results": [...],
  "issues": [...],
  "stats": {
    "datacenters": 1,
    "clusters": 4,
    "hosts": 15,
    "hosts_skipped": 0,
    "io_cards": 100,
    "storage_devices": 30,
    "vcenter_query_ms": 1234,
    "broadcom_hcl_query_ms": 5678,
    "vsan_db_query_ms": 234
  }
}

Text (-stats): a Statistics section after the report, split into Inventory (counts) and Runtime (timings).

What to measure

Inventory counts (from the raw inventory = amount collected):

  • datacenters, clusters, hosts (scanned), hosts_skipped, io_cards (PCI io card *), storage_devices (vSAN disks)

Runtime timings:

  • vcenter_query_ms — wall time of the phase-1 collection (collectVSphereData)
  • broadcom_hcl_query_ms — total time in live (uncached) Broadcom calls, accumulated in the query cache
  • vsan_db_query_ms — time to load/refresh the vSAN offline DB

Notes

  • Off by default; -stats enables it. Works in both text and JSON.
  • Broadcom timing reflects only cache misses (post-Cross-host dedup of Broadcom HCL queries #15 dedup), so it is the true network cost.
  • Additive/non-breaking: stats is omitempty, absent unless -stats is set.

Acceptance criteria

  • -json -stats adds a populated top-level stats object; without -stats the key is absent
  • -stats in text mode prints an Inventory + Runtime section
  • Counts match the collected inventory; timings are plausible non-negative values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0