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

Overview

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
You might also like...
An application focused on managing men's haircuts. It has never been so easy to keep the cut on time
An application focused on managing men's haircuts. It has never been so easy to keep the cut on time

An application focused on managing men's haircuts. It has never been so easy to keep the cut on time

A command-line tool and Swift Package for generating class diagrams powered by PlantUML
A command-line tool and Swift Package for generating class diagrams powered by PlantUML

SwiftPlantUML Generate UML class diagrams from swift code with this Command Line Interface (CLI) and Swift Package. Use one or more Swift files as inp

A Swift package for rapid development using a collection of micro utility extensions for Standard Library, Foundation, and other native frameworks.
A Swift package for rapid development using a collection of micro utility extensions for Standard Library, Foundation, and other native frameworks.

ZamzamKit ZamzamKit is a Swift package for rapid development using a collection of micro utility extensions for Standard Library, Foundation, and othe

Updeto is a simple package that help update checker for iOS Apps

Updeto is a simple package that will help you to check if the currently installed version is the same as the latest one available on App Store.

Swift implementation of the package url spec

PackageURL Swift implementation of the package url specification. Requirements Swift 5.3+ Usage import PackageURL let purl: PackageURL = "pkg:swift/a

Mechanical editing support for Package.swift manifests

Mechanical editing support for Package.swift manifests. Implements Swift Evolution proposal SE-301

Swift Package for Decoding RSS Feeds.

SyndiKit Swift Package built on top of XMLCoder for Decoding RSS Feeds. Check out the DocC-Built Site! Table of Contents Introduction Features Install

A simple Swift package for counting the Syllables in a sentence.

A simple Swift package for counting the Syllables in a sentence.

This package will contain the standard encodings/decodings/hahsing used by the String Conversion Tool app.

This package will contain the standard encodings/decodings/hahsing used by the String Conversion Tool app. It will also, however, contain extra encoding/decoding methods (new encoding/decoding)

Owner
Mezhevikin Alexey
Mobile developer. Creator of the most popular currency converter getconverter.org. I write in Swift and Kotlin
Mezhevikin Alexey
Swift For Any Measure: Simplified

AnyMeasure Swift For Any Measure: Simplified A clean, Swift interface for Foundation.Measurement Read my post about it here. Requirements: Swift 4.0+

Jason Jobe 3 Sep 25, 2022
A declarative, thread safe, and reentrant way to define code that should only execute at most once over the lifetime of an object.

SwiftRunOnce SwiftRunOnce allows a developer to mark a block of logic as "one-time" code – code that will execute at most once over the lifetime of an

Thumbtack 8 Aug 17, 2022
Simple utility for only executing code every so often.

Rate Limit Simple utility for only executing code every so often. This will only execute the block passed for a given name if the last time it was cal

Sam Soffes 921 Nov 20, 2022
Taking a string containing a csv file and split it into records (aka lines) containing fields of data (aka Array of SubStrings)

Swift .csv parser Taking a string containing a csv file and split it into records (aka lines) containing fields of data (aka Array of SubStrings). Par

Matthias 0 Dec 29, 2021
A tiny generator of random data for swift

SwiftRandom SwiftRandom is a tiny help suite for generating random data such as Random human stuff like: names, gender, titles, tags, conversations Ra

Kan Yilmaz 559 Dec 29, 2022
A tiny macOS utility to foster sustainable OSS

SustainableOSS SustainableOSS is a status bar app for macOS that indexes the third-party dependencies your projects depend on, sorts them by usage, an

Tuist 0 Dec 14, 2021
Swift Package Manager plugin which runs ActionBuilder to create a Github Actions workflow for a swift package.

ActionBuilderPlugin A Swift Package Manager command which builds a Github Actions workflow for the current package. By default the workflow file will

Elegant Chaos 4 Jul 20, 2022
OwO.swift Badges go here in one line for the master branch ONLY.

OwO.swift Badges go here in one line for the master branch ONLY. Badges can also go in the header line. Short description describing the application/l

Spotlight 2 May 28, 2022
Random and time-ordered UUID generation in Swift

UniqueID UUIDv4 and v6* generation in Swift. [API Reference] A UUID is an identifier that is unique across both space and time, with respect to the sp

Karl 34 Nov 16, 2022
MetricTime is designed to be one universal timekeeping system that eliminates the hassle of calculating time since most of its convertions as simple as converting meters to centimeters

MetricTime MetricTime is designed to be one universal timekeeping system that eliminates the hassle of calculating time since most of its convertions

Adrian Edwards 4 Feb 10, 2022