Commit Graph

106 Commits

Author SHA1 Message Date
hamzahrmalik 3402510406
Make 'values' on TestCounter, TestRecorder and TestMeter public (#129)
Co-authored-by: Hamzah Malik <hamzah_malik@apple.com>
2023-05-26 14:49:59 +02:00
hamzahrmalik 8bcdb6e82b
MetricsTestKit: expose all metrics publicly. This allows users to run checks on counters when they might not know the exact label (#127)
Co-authored-by: Hamzah Malik <hamzah_malik@apple.com>
2023-05-26 14:02:46 +02:00
hamzahrmalik 9d5ff3d48f
Use the MetricsTestKit in the MetricsTests rather than using a copy of the TestMetrics utilities (#128)
Co-authored-by: Hamzah Malik <hamzah_malik@apple.com>
2023-05-26 13:25:08 +02:00
tomer doron 32eef8ae84
add "meter" - a new type of metric and metric handler (#123)
motivation: seperate gauge from recorder in a backwards compatible way

changes:
* add new meter and meter handler pair
* add increment and decrement to meter handler
* add default implementation based on recorder for backwards compatibility
* add and adjust tests
2023-05-24 13:55:56 -07:00
Fabian Fett 862b99bc11
Add Package.resolved to .gitignore (#125)
Co-authored-by: Konrad `ktoso` Malawski <konrad.malawski@project13.pl>
2023-05-05 11:19:02 +09:00
Fabian Fett 78b6238009
Use UUID instead of NSUUID in MetricsTests (#126) 2023-05-05 11:01:45 +09:00
Yim Lee a79936ffc1
Update CI (#124)
- Swift 5.8 docker images are available
- Add docker-compose file for Swift 5.9
2023-04-04 20:30:21 -07:00
Gustavo Cairo e8bced74bc
Propagate displayUnit when using MultiplexMetricsHandler (#122) 2023-02-01 11:42:39 -08:00
Yim Lee cbfde655cf
Add CI for Swift 5.8 and update nightly to Ubuntu 22.04 (#121) 2023-01-24 13:34:45 -08:00
Yim Lee 9b39d811a8
Add .spi.yml for Swift Package Index DocC support (#119) 2022-12-02 12:29:28 -08:00
Konrad `ktoso` Malawski bcea8c19fe
+docc prepare for docc publishing (#118)
* +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>
2022-08-24 11:20:06 +09:00
Fabian Fett bd1b935c8e
Make `MetricsFactory` Sendable (#116) 2022-07-21 10:53:47 +09:00
Fabian Fett 53be78637e
Remove testable import from TestMetrics. (#113) 2022-07-20 17:25:45 +09:00
tomer doron d885a4f5e9
adopt sendable (#109)
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
2022-07-01 16:38:50 -07:00
tomer doron fd0ee6956b
better abstration for MetricsSystem state (#112)
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
2022-06-29 11:08:12 -07:00
Fabian Fett 1c1408bf8f
Expose `MetricsTestKit` as a product (#111) 2022-05-25 07:15:41 +09:00
Konrad `ktoso` Malawski eadb828f87
Import TestMetrics from swift-metrics-extras (#106)
* Import TestMetrics from swift-metrics-extras

* support the year 2021

* rename module
2022-03-18 12:02:04 +09:00
tomer doron e00284be24
ci update (#108)
motivation: 5.6 is out

changes:
* use release version of 5.6
* add docker setup for 5.7 (using nightly for now)
2022-03-16 21:04:42 -07:00
Cory Benfield ea66bbc2b5
Add 5.6 nightly CI (#105)
The 5.6 nightly images are avaialable, let's use them.
2022-01-18 11:52:54 -08:00
Konrad `ktoso` Malawski d09e751437 Update how we recommend including the dependency
Since otherwise current users get hit with warnings.
2021-12-17 10:36:44 +09:00
tomer doron 6bc8aa8a06
add docker-compose setup for 5.5 (#104)
motivation: tests on 5.5

changes: add docker compose file for testing on 5.5
2021-12-16 16:38:36 -08:00
tomer doron 495aca6d51
update doc generation script (#103)
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
2021-12-16 15:17:27 -08:00
Konrad `ktoso` Malawski 992b87907d [SSWG] document release process 2021-08-23 13:10:27 +09:00
Rauhul Varma 3edd2f57af update comment 2021-08-16 11:49:56 +09:00
Rauhul Varma 2c58b010a2 remove assertions 2021-08-16 11:49:56 +09:00
Rauhul Varma 42372a8598 Introduce FloatingPointCounter
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.
2021-08-16 11:49:56 +09:00
tomer doron 99a068b962 Update README.md 2021-06-21 11:24:47 +09:00
tomer doron 8ea359b532 Update README.md 2021-06-21 11:24:47 +09:00
tomer doron 2a7fd99ea8 Update README.md 2021-06-21 11:24:47 +09:00
tomer doron 1bb953eb76 Create SECURITY.md 2021-06-21 11:24:47 +09:00
tomer doron e2c4a510b6
update 5.4 to release docker image (#94)
motivation: 5.4 is out!

changes: use release docker images instead of nightly
2021-05-06 18:24:14 -07:00
James Sherlock c6cdc69235
[readme] Add OpenTelemetry to compatible libraries (#93)
Add OpenTelemetry to compatible libraries
2021-04-06 10:35:50 -07:00
tom doron de1a7d570b add docker setup for 5.4 and nightly
motivation: CI for 5.4 and latest

changes: add docker setup files for 5.4 and main nightly images
2021-02-27 10:58:36 +09:00
Yim Lee 923775a5f6
Use welcoming language (#90) 2021-01-22 00:42:50 -08:00
Konrad `ktoso` Malawski 68e6cb2938 Apply suggestions from code review 2020-11-17 10:07:04 +09:00
Konrad `ktoso` Malawski c793c35d07 Apply suggestions from code review
Co-authored-by: Yim Lee <yim_lee@apple.com>
2020-11-17 10:07:04 +09:00
Konrad `ktoso` Malawski 7274cf41ef +readme Cross link to extras 2020-11-17 10:07:04 +09:00
Jari (LotU) e382458581 Remove reader lock 2020-11-12 18:10:16 +09:00
Jari (LotU) 2b6e31e1b3 Expose lock functionality 2020-11-12 18:10:16 +09:00
Konrad `ktoso` Malawski f5ed78cb26 =core remove not used import (Dispatch) 2020-10-13 10:39:24 +09:00
Moritz Lang 44e8bfc7f5
Add Timer.recordInterval method (#83)
* Add Timer.recordInterval method

Co-authored-by: Konrad `ktoso` Malawski <ktoso@apple.com>
2020-10-12 12:18:21 -07:00
Konrad `ktoso` Malawski 5702ee1174
metrics should include their labels when printed to ease debugging (#82)
motivation: ease debugging

changes: confirm metrics types to CustomStringConvertible
2020-10-08 15:08:43 -07:00
tomer doron cf757fe4eb
remove symbolicate-linux-fatal from Docker (#81)
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
2020-10-07 16:46:50 -07:00
tomer doron 69cc955761 Swift 5.3 was released, use if for CI
motivation: Swift 5.3 was released, use if for CI

changes: update docker setup to use the release version of 5.3
2020-09-20 12:09:04 +09:00
Konrad `ktoso` Malawski b6c9d615de =readme Fix link to point at main branch 2020-09-08 14:56:01 +09:00
Konrad `ktoso` Malawski f46b1894aa Update CONTRIBUTING.md 2020-07-18 12:22:54 +09:00
Konrad `ktoso` Malawski 313c84fdec add sanity.sh info to contributing.md 2020-07-18 12:22:54 +09:00
tomer doron 56ae451f00
improve 5.3 docker setup (#71)
motivation: pin to 5.3 nighties 

changes: use swiftlang/swift:nightly-5.3-master-bionic instead of swiftlang/swift:nightly-master-bionic
2020-05-05 12:00:16 -07:00
tomer doron 41d2db7675
update ci setup (#67)
motivation: 5.2 adoption, prepare for 5.3

changes:
* add 5.2 docker-compose setup
* add 5.3 docker-compose setup (placeholder)
* remove 4.2 docker-compose setup
* format
2020-04-03 19:50:13 -07:00
Johannes Weiss a8db098592
Update README.md (#65) 2020-03-04 08:37:02 -08:00