Motivation:
`Timer.record*` methods are generic to cover all cases of `BinaryInteger` values and converts the passed value into `Int64` before doing time unit conversions and overflow checks.
Modifications:
All methods that accept `BinaryInteger` types and converts to `Int64` now guards against values higher than `Int64.max`
Result:
Users can reliably use the `Timer.record*` APIs with `BinaryInteger` types without concern for unknowing fatal errors.
* doc: #26 clarify which init to use, reformat docs for easier noticing this
* Mark all "we do not expect this API to be used in normal..." as warnings
Motivation:
API documentation contains typos and grammatical errors.
Modifications:
Fix typos and grammatical errors. Update to use code syntax where
appropriate.
Result:
Eliminate typos and grammatical errors found.
motivation: distribute the library via podspec
changes:
* add build_podspec.sh script
* adjust sanity check to support more types of copyright years format
Motivation:
Allowing readers of the API documentation to drill into the implementation of documented declarations can be educational and helpful for debugging, among several other reasons.
Modifications:
Add --github-file-prefix appending the current version in order to keep stable links. This means that documentation generated from any non-release revision may resolve incorrectly. This can be refined in the doc generation script later if it is deemed problematic by resolving to the commit sha if it doesn't exactly align with the version.
Result:
Users will be able to click a 'Show on GitHub' for all documented API declarations.
motivation: highlight the need to address overflow in metric objects that are integer based
changes:
* add section in the readme about addressing woverflow
* fix timer's unit conversion to address potential overflow
motivation: allow middleware libraries better control of metric object lifecycle to reduce potential memory footprint when using metrics libraries that use some kind of registry or cache (eg polling backends)
changes:
* Introduce metric.destroy() to enable lifecycle management
* Add destroy functions to example impl in readme
The bootstrap used to be invoked using `MyFactory.init` but nowadays we changed it to accepting an factory instance.
**Problem:**
- snippet was misleading and would not compile
**Solution:**
- change to snippet that will work with current shape of API
- make the code snippet more visible and not in-line, so it is easier to spot "so what do I need to do to bootstrap again...?"
motivation: use consistent formatting
changes: update generate_linux_tests to match the formatting rules we use: `swiftformat --self insert --patternlet inline --stripunusedargs unnamed-only --comments ignore`
* rename Counter::increment "value" parameter to "by"
motivation: nicer API signature
changes: rename Counter::increment and CounterHandler::increment "value" parameter to "by"
* prepare to release
motivation: the sswg voted to adopt the API. this is to prepare to a release
changes:
* rewrite readme
* add API docs
* add utilitiy scripts and docker setup for CI
* adjust linux tests
motivation: it's very beneficial for the protocols to use functions with concrete types because then there's no need for specialisation. At compile time, the compiler can often not know what concrete type will be used so it needs to create a 'generic at runtime' version of the function. If however all functions on the protocol do not use generics, there's no need for a 'generic at runtime' version of the function
changes:
* change CounterHandler::increment to take Int64 instead of <DataType: BinaryInteger>
* change RecorderHandler::record to take Int64 and Double instead of <DataType: BinaryInteger> and <DataType: BinaryFloatingPoint>
* adjust example and test implementation
* adjust docs
motivation: address feedback from community, prepare for moving api to official repo
changes:
* add reset method to counter
* do not force the user facing metric object to implement the mteric handler protocol. this was done for convinience and confuses matters
* adjust tests
* fix a few typos
motivation: after much discussion around logging API, we settled on a different API style, primairly the fact that we will use initializers instead of factories
changes:
* introduce intermediate classes for Counter, Timer and Recorder which are designed to replace the Metrics.makeCounter, Metrics.makeTimer and Metrics.makeRecorder APIs and wrap corresponding CounterHandler, TimerHandler and ReorderHandler coming from the metrics implmentation
* rename Metrics to MetricsSystem
* rename MetricsHandler -> MetricsFactory
* remove Metrics.withCounter, Metrics.withTimer and Metrics.withRecorder syntactic sugar
* rename Metrics.timed with Timer.measure
* make sure metrics system can only be initialized/bootstrapped once per process
* adjust and add tests
* add a bit of docs on key APIs