Add a performance test for the Diamond-Square renderer
This commit is contained in:
parent
f0d6177567
commit
50d895afa1
3 changed files with 65 additions and 0 deletions
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>classNames</key>
|
||||
<dict>
|
||||
<key>DiamondSquareAlgorithmPerformanceTests</key>
|
||||
<dict>
|
||||
<key>testAlgorithmOn129()</key>
|
||||
<dict>
|
||||
<key>com.apple.XCTPerformanceMetric_WallClockTime</key>
|
||||
<dict>
|
||||
<key>baselineAverage</key>
|
||||
<real>0.5</real>
|
||||
<key>baselineIntegrationDisplayName</key>
|
||||
<string>Local Baseline</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>runDestinationsByUUID</key>
|
||||
<dict>
|
||||
<key>F0E38CD2-E120-4CFB-93F0-FBFD96154C8A</key>
|
||||
<dict>
|
||||
<key>localComputer</key>
|
||||
<dict>
|
||||
<key>busSpeedInMHz</key>
|
||||
<integer>100</integer>
|
||||
<key>cpuCount</key>
|
||||
<integer>1</integer>
|
||||
<key>cpuKind</key>
|
||||
<string>Intel Core i7</string>
|
||||
<key>cpuSpeedInMHz</key>
|
||||
<integer>3300</integer>
|
||||
<key>logicalCPUCoresPerPackage</key>
|
||||
<integer>4</integer>
|
||||
<key>modelCode</key>
|
||||
<string>MacBookPro13,2</string>
|
||||
<key>physicalCPUCoresPerPackage</key>
|
||||
<integer>2</integer>
|
||||
<key>platformIdentifier</key>
|
||||
<string>com.apple.platform.macosx</string>
|
||||
</dict>
|
||||
<key>targetArchitecture</key>
|
||||
<string>x86_64</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
|
@ -13,6 +13,16 @@ fileprivate typealias Box = DiamondSquareGenerator.Box
|
|||
fileprivate typealias Point = DiamondSquareGenerator.Point
|
||||
fileprivate typealias Size = DiamondSquareGenerator.Size
|
||||
|
||||
class DiamondSquareAlgorithmPerformanceTests: XCTestCase {
|
||||
func testAlgorithmOn129() {
|
||||
let box = Box(origin: Point(x: 0, y: 0), size: Size(w: 129, h: 129))
|
||||
let alg = DiamondSquareGenerator.Algorithm(grid: box)
|
||||
measure {
|
||||
_ = alg.queue_render()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class DiamondSquareAlgorithmTests: XCTestCase {
|
||||
fileprivate let grid = Box(origin: Point(x: 0, y: 0), size: Size(w: 5, h: 5))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue