Summary
- parameterize metering usage collection with a minimum elapsed interval
- keep regular collection cycles on the existing one-hour threshold
- collect final usage during resource untracking with a zero-second threshold so short-lived resources are billed before being stopped
- add regression coverage for regular vs final collection intervals
Test plan
cargo test -p metering should_collect_usage -- --nocapturecargo test -p meteringcargo clippy -p metering --all-targets(passes with existing warnings)cargo clippy -p metering --all-targets -- -D warnings(blocked by pre-existing warnings in unrelated metering files)cargo test --workspace
Closes #333
## Summary
- parameterize metering usage collection with a minimum elapsed interval
- keep regular collection cycles on the existing one-hour threshold
- collect final usage during resource untracking with a zero-second threshold so short-lived resources are billed before being stopped
- add regression coverage for regular vs final collection intervals
## Test plan
- `cargo test -p metering should_collect_usage -- --nocapture`
- `cargo test -p metering`
- `cargo clippy -p metering --all-targets` (passes with existing warnings)
- `cargo clippy -p metering --all-targets -- -D warnings` (blocked by pre-existing warnings in unrelated metering files)
- `cargo test --workspace`
Closes #333