Utility to run the SPI-Server tests as a benchmark

Overview

spi-benchmark

This package comprises a simple tool to run the SwiftPackageIndex-Server tests in a loop, logging the run times. The purpose is to collect both information about a machine's performance as well as the tests themselves, by looking at different revisions.

Example:

❯ swift run spi-benchmark --count 2 --work-dir ~/Projects/spi-server
[0/0] Build complete!
NB: the first iteration will also build the tests if needed, which might take a moment. This time will not be added to the test run.

Running iteration: 	0 ...
Run time: 27.126
Running iteration: 	1 ...
Run time: 26.512

Revision: 2.47.9
Run Times: 27.126, 26.512

Benchmarking instructions

  • Clone @SwiftPackages at revision 2.47.9 (or whatever revision was indicated for comparison)
git clone --branch 2.47.9 --depth 1 https://github.com/SwiftPackageIndex/SwiftPackageIndex-Server
  • Make sure building and testing works by running tests
cd SwiftPackageIndex-Server
cp .env.testing.template .env.testing
make db-up-test
make test-fast
  • Clone the benchmark project
cd ..
git clone --branch 0.0.2 https://github.com/SwiftPackageIndex/spi-benchmark
  • Run build benchmark
swift run spi-benchmark -w ../SwiftPackageIndex-Server -m build --count 20
  • Run test benchmark
swift run spi-benchmark -w ../SwiftPackageIndex-Server -m test --count 20
  • Report back system spec and the last line Run times: ...

Thank you :)

You might also like...
A simple utility allowing to detect Swift version at runtime.

SwiftVersionDetector SwiftVersionDetector allows you to detect Swift version at runtime. Note that detecting the Swift version of the machine on which

Ethereum Wallet Toolkit for iOS - You can implement an Ethereum wallet without a server and blockchain knowledge.
Ethereum Wallet Toolkit for iOS - You can implement an Ethereum wallet without a server and blockchain knowledge.

Introduction EtherWalletKit is an Ethereum Wallet Toolkit for iOS. I hope cryptocurrency and decentralized token economy become more widely adapted. H

swift-highlight a pure-Swift data structure library designed for server applications that need to store a lot of styled text

swift-highlight is a pure-Swift data structure library designed for server applications that need to store a lot of styled text. The Highlight module is memory-efficient and uses slab allocations and small-string optimizations to pack large amounts of styled text into a small amount of memory, while still supporting efficient traversal through the Sequence protocol.

Swift Server Implementation - RESTful APIs, AWS Lambda Serverless For Swift Runtime amazonlinux: AWS Lambda + API Gateway
Swift Server Implementation - RESTful APIs, AWS Lambda Serverless For Swift Runtime amazonlinux: AWS Lambda + API Gateway

Swift Server Implementation - RESTful APIs, AWS Lambda Serverless For Swift Runtime amazonlinux: AWS Lambda + API Gateway deployed on Graviton arm64 build swift:5.6.2-amazonlinux2-docker image

A script to fetch packages via Github search and diff them against SPI

spi-package-importer importer is a command line utility with three subcommands: fetch package lists from Github via search and save them to JSON files

A Swift library for hardware projects on Linux/ARM boards with support for GPIOs/SPI/I2C/PWM/UART/1Wire.
A Swift library for hardware projects on Linux/ARM boards with support for GPIOs/SPI/I2C/PWM/UART/1Wire.

A Swift library for hardware projects on Linux/ARM boards with support for GPIOs/SPI/I2C/PWM/UART/1Wire. Summary This library provides an easy way to

WKZombie is a Swift framework for iOS/OSX to navigate within websites and collect data without the need of User Interface or API, also known as Headless browser. It can be used to run automated tests / snapshots and manipulate websites using Javascript. Erik is an headless browser based on WebKit. An headless browser allow to run functional tests, to access and manipulate webpages using javascript.
Erik is an headless browser based on WebKit. An headless browser allow to run functional tests, to access and manipulate webpages using javascript.

Erik Erik is a headless browser based on WebKit and HTML parser Kanna. An headless browser allow to run functional tests, to access and manipulate web

A repository that demonstrates the difficulty to run async tests with Xcode 13.2 beta on pre iOS-15 simulators

A repository that demonstrates the difficulty to run async tests with Xcode 13.2 beta on pre iOS-15 simulators This demonstration uses an iOS 13.7 sim

Erik is an headless browser based on WebKit. An headless browser allow to run functional tests, to access and manipulate webpages using javascript.
Erik is an headless browser based on WebKit. An headless browser allow to run functional tests, to access and manipulate webpages using javascript.

Erik Erik is a headless browser based on WebKit and HTML parser Kanna. An headless browser allow to run functional tests, to access and manipulate web

Small library to easily run your tests directly within a Playground
Small library to easily run your tests directly within a Playground

[] (https://developer.apple.com/swift/) Build Status Branch Status master develop About PlaygroundTDD enables you to use TDD directly on Xcode Playgro

PlaygroundTester enables you to easily run tests for your iPad Playgrounds 4 project.

PlaygroundTester PlaygroundTester is a package that enables you to add tests to your iPad Swift Playgrounds project. Installation Just add PlaygroundT

Gauntlet is a collection of testing utility methods that aims to make writing great tests easier.

Gauntlet What is Gauntlet? Gauntlet is a collection of testing utility methods that aims to make writing great tests easier and with more helpful and

Small utility command line tool you can run locally from your mac

push-service Small utility command line tool you can run locally from your mac, for testing sending push notifications to actual devices. The push ser

Swift-Misc-Utility - Taking the misc out of General Utility so that General only defines the namespace

Swift-Misc-Utility Everything extra that used to be in Swift-General-Utility has

Mockit is a Tasty mocking framework for unit tests in Swift 5.0
Mockit is a Tasty mocking framework for unit tests in Swift 5.0

Mockit Introduction Mockit is a Tasty mocking framework for unit tests in Swift 5.0. It's at an early stage of development, but its current features a

Another network wrapper for URLSession. Built to be simple, small and easy to create tests at the network layer of your application.
Another network wrapper for URLSession. Built to be simple, small and easy to create tests at the network layer of your application.

Another network wrapper for URLSession. Built to be simple, small and easy to create tests at the network layer of your application. Install Carthage

Swift Package with examples of how to tests iOS apps

GimmeTheCodeTDD A swift package with examples of unit tests in iOS development. Requirements Xcode 13 Content Dependency Injection Constructor Injecti

Swift iOS app that tests if you are depressed
Swift iOS app that tests if you are depressed

Depressed? is an app that asks you the nine questions from the PHQ-9 questionnaire to determine if you are depressed. The questionnaire is implemented

Comments
  • iMac 2021 - M1 - 16 GB results

    iMac 2021 - M1 - 16 GB results

    Fastest build time: 41.2 Fastest run time: 23.4

    Build:

    Revision: 2.47.9 Run times: 47.07164800167084, 41.96791899204254, 42.32194399833679, 41.900104999542236, 41.61660194396973, 41.28599810600281, 41.15518295764923, 42.82579207420349, 41.88457202911377, 41.58618700504303, 41.794017910957336, 41.85750198364258, 41.725149035453796, 41.90049707889557, 41.490755915641785, 41.971883058547974, 42.16879498958588, 42.72829794883728, 43.37521493434906, 42.29733896255493

    Run: Running test: 0 ... Run time: 23.403 Running test: 1 ... Run time: 23.527 Running test: 2 ... Run time: 23.579 Running test: 3 ... Run time: 23.493 Running test: 4 ... Run time: 23.529 Running test: 5 ... Run time: 23.541 Running test: 6 ... Run time: 23.575 Running test: 7 ... Run time: 23.532

    (error on run 8)

    opened by trozware 7
Owner
Swift Package Index
Swift Package Index
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

Zamzam Inc. 261 Dec 15, 2022
macOS utility for converting fat-frameworks to SPM-compatible XCFramework with arm64-simulator support

xcframework-maker macOS utility for converting fat-frameworks to SPM-compatible XCFramework with arm64-simulator support. ?? Description make-xcframew

Dariusz Rybicki 312 Dec 22, 2022
A utility to generate PreviewDevice presets from the available devices

SwiftUIGen A utility to generate PreviewDevice presets from the available devices Installation Manual Go to the GitHub page for the latest release Dow

Timberlane Labs 29 Nov 14, 2022
Simple utility to change macOS Big Sur menu bar color by appending a solid color or gradient rectangle to a wallpaper image

Change menu bar color in macOS Big Sur Simple utility to change macOS Big Sur menu bar color by appending a solid color or gradient rectangle to a wal

Igor Kulman 876 Jan 5, 2023
A simple Swift utility for producing pseudolocalized strings.

Build your App UI to adapt and respond to translations, and find localization bugs!

Reece Como 2 Sep 28, 2021
A simple macOS utility that can be used to control the behaviour of Bose QC35 Headphones straight from the menu bar.

bose-macos-utility A simple macOS utility that can be used to control the behaviour of Bose QC35 Headphones straight from the menu bar. Why Have you e

Łukasz Zalewski 11 Aug 26, 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
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
Utility functions for validating IBOutlet and IBAction connections

Outlets Utility functions for validating IBOutlet and IBAction connections. About Outlets provides a set of functions which validate that IBOutlets ar

Ben Chatelain 129 May 2, 2022
Super powerful remote config utility written in Swift (iOS, watchOS, tvOS, OSX)

Mission Control Super powerful remote config utility written in Swift (iOS, watchOS, tvOS, OSX) Brought to you by Have you ever wished you could chang

appculture 113 Sep 9, 2022