Measure

master

⏲ A tiny package to measure code execution time. Only 20 lines of code.
mezhevikin/Measure

Measure

A tiny package to measure code execution time.

Measure.start("create-user")
let user = User()
Measure.finish("create-user")

Console

// ⏲ Measure [create-user]: 0.00521 sec.

Measure async request

Measure.start("request")
let url = URL(string: "https://httpbin.org/get")!
URLSession.shared.dataTask(with: url) { _, _, _ in
    let time = Measure.finish("request")
    Analytics.send(event: "request", ["time" => time])
}.resume()

Swift Package Manager

https://github.com/mezhevikin/Measure.git

Description

  • Swift Tools 5.5.0
View More Packages from this Author

Dependencies

  • None
Last updated: Tue Nov 08 2022 06:22:40 GMT-0500 (GMT-05:00)