This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1. Copyright Classmethod, Inc. Xcode 6
2. iPhone AB Copyright Classmethod, Inc.
3. BotsYosemiteServer 4.0 Copyright Classmethod, Inc.
4. / Copyright Classmethod, Inc.
5. Copyright Classmethod, Inc.
6. Testself.measureBlock(){} Copyright Classmethod, Inc. func
testPerformanceExample() { // This is an example of a performance
test case. self.measureBlock() { // Put the code you want to
measure the time of here. } }
7. Function class Logger { let max = 10000 func writeNSLog(){
for var i = 0; i < max; i++ { NSLog("%d",i) } } func
writePrintln(){ for var i = 0; i < max; i++ {
println(NSDate.date().description + " " + String(i)) } }
NSLogPrintln1 Copyright Classmethod, Inc.
8. import XCTest class BotsTests: XCTestCase { func
testLoggerPrintln() { let logger = Logger() self.measureBlock() {
logger.writePrintln() } } func testLoggerNSLog() { let logger =
Logger() self.measureBlock() { logger.writeNSLog() } NSLog}
Println1 } Copyright Classmethod, Inc.
9. Test NavigatorU Copyright Classmethod, Inc.
10. 10 Copyright Classmethod, Inc. 10
11. 10 Copyright Classmethod, Inc. Result Average Baseline Max
STDDEV
12. 10 Copyright Classmethod, Inc. 3.006 2.09 43.48%
13. 10% (Avarage)10% Standard Deviation Copyright Classmethod,
Inc.
14. Copyright Classmethod, Inc. No Baseline Set Baseline
Baseline
15. Copyright Classmethod, Inc. No Baseline Set Baseline
Baseline