-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Further improvements around kstat creation times
- Update the kstat chain more frequently, including when targets are added and sampled. - Handle situation when a target signals interest in zero kstats, and clarify documentation. This is actually what happens when a kstat itself disappears and we then update the chain (previously, it was an error because the sampling method did _not_ update the chain). Treat this like an error, and increment the expiration counters. Make clear in the documentation that this situation is included in those counters. - Add a per-kstat (not target) mapping that stores the creation times. These are included whenever we add a target, and also at sampling time, if needed. This lets us track the creation time in UTC reliably, while also providing it accurately to the `KstatTarget::to_samples()` method. These are removed only when the kstat itself goes away, which we check for periodically in the main `run()` loop, to avoid keeping them around forever.
- Loading branch information
Showing
3 changed files
with
367 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.