* +docc prepare for docc publishing
* fix test discovery on 5.5 and 5.6
* Delete Package@swift-5.6.swift
* Update Package.swift
* Apply suggestions from code review
Co-authored-by: Yim Lee <yim_lee@apple.com>
Co-authored-by: Yim Lee <yim_lee@apple.com>
motivation: adjust to swift 5.6
changes:
* define sendable shims for protocols and structs that may be used in async context
* refactor Gauge to include rather than inherit Recorder
* adjust tests
* add a test to make sure no warning are emitted
motivation: prepare for sendable checks (they dont work well with static state)
changes:
* abstract the MetricsSystem state into a "boxed" class that handles the locking
* adjust call sites
motivation: source-kitten has changed how its invoked
changes:
* invoke source-kitten with the correct flags
* make location of source-kitten source checkout more robust
* udpate docker to install jazzy on on focal
motivation: It is not currently possible to record floating point values via the swift-metrics API even if the metrics backend supports it.
modifications: Adds a `FloatingPointCounter` type to allow users to accumulate non-integral metrics backed by a `FloatingPointCounterHandler`. Introduces a default implementation for creating and destroying `FloatingPointCounterHandler`s for metric backends that do not natively support floating point counters. On such backends, `FloatingPointCounter` is backed by a `AccumulatingRoundingFloatingPointCounter` which accumulates floating point values internally and record increments to a wrapped `CounterHandler` after crossing integer boundaries.
result: Users can create `FloatingPointCounter`s to record floating point values and get enhanced behavior for backends that support floating point values.
motivation: we are not actually using symbolicate-linux-fatal in any meaningful way in CI and it's pinned to the master branch which has been removed
changes: remove symbolicate-linux-fatal fetching from Docker
Motivation:
I have a metrics backend where I need to store timer values in
microseconds. The "preferred display unit" models this exactly, but it
seems to have (inadvertently?) omitted the possibility to express
microseconds. Note that among the timer "report" methods there is
already a microseconds option.
Changes:
* change TimeUnit from enum to struct with static members to support non-api breaking future evolution
* add scaleFromNanoseconds to TimeUnit to make it easy to compute the values without switching over
* add tests
Co-authored-by: Chris Burrows <cburrows@gmail.com>
motivation: docs scripts is broken on selinux due to restriction on ssh-agent
changes:
* change the jazzy workspace to a directory accessible by the CI node so we can push from the agent instead of from the docker container
* dont remove older docs when pushing new ones
* add version inforamtion and source links
MetricsSystem.bootstrap verifies that the metric system has not been previously
initialized. Otherwise it should fail with a corresponding error message. The
precondition error message includes the name of the currently used factory and
for that accesses self.factory. However, because bootstrap already holds
self.lock as a writer lock, self.factory fails to get it as a reader and
crashes with a less useful precondition error message. This commit ensures that
the correct error message is printed.
motivation: more secured ci setup
changes:
* enable :z selinux flag on bind mounts so we can enable selinux on ci
* drop potentially exploitable capabilities from docker-compose
motivation: adjust format to xcode format
changes:
* update .swiftformat no-indent setting and run formatter
* update test generation script to match correct format
motivation: better ci testing
changes:
* add api breakage script to test api breakage in ci
* add "shell" utility docker-compose task to run api breakage script
* change test task to treat warning as errors
* prepare to test with thread sanitizer in 5.1