Swift
XCTest Performance Testing: measure Blocks, Baselines, and Metrics
XCTest includes a built-in performance testing API that lets you measure how long a block of code takes and compare it against a stored baseline. When performance regresses, the test fails — giving you an early warning before slow code ships to users. The measure Block The simplest performance test wraps