├── lockPerformance.png
├── LockPerformance
├── LockPerformance
│ ├── en.lproj
│ │ └── InfoPlist.strings
│ ├── NYKAppDelegate.h
│ ├── LockPerformance-Prefix.pch
│ ├── main.m
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── LockPerformance-Info.plist
│ ├── NYKAppDelegate.m
│ ├── NYKLockTest.h
│ └── NYKLockTest.m
├── LockPerformanceTests
│ ├── en.lproj
│ │ └── InfoPlist.strings
│ └── LockPerformanceTests.m
└── LockPerformance.xcodeproj
│ ├── project.xcworkspace
│ └── contents.xcworkspacedata
│ └── project.pbxproj
└── README.md
/lockPerformance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nyisztor/LockTest/HEAD/lockPerformance.png
--------------------------------------------------------------------------------
/LockPerformance/LockPerformance/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/LockPerformance/LockPerformanceTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/LockPerformance/LockPerformance.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/LockPerformance/LockPerformance/NYKAppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // NYKAppDelegate.h
3 | // LockPerformance
4 | //
5 | // Created by Nyisztor Karoly on 2014.05.26..
6 | // Copyright (c) 2014 NyK. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NYKAppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/LockPerformance/LockPerformance/LockPerformance-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_3_0
10 | #warning "This project uses features only available in iOS SDK 3.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/LockPerformance/LockPerformance/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // LockPerformance
4 | //
5 | // Created by Nyisztor Karoly on 2014.05.26..
6 | // Copyright (c) 2014 NyK. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "NYKAppDelegate.h"
12 |
13 | int main(int argc, char * argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([NYKAppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/LockPerformance/LockPerformance/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "40x40",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "60x60",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/LockPerformance/LockPerformance/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/LockPerformance/LockPerformanceTests/LockPerformanceTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // LockPerformanceTests.m
3 | // LockPerformanceTests
4 | //
5 | // Created by Nyisztor Karoly on 2014.05.26..
6 | // Copyright (c) 2014 NyK. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface LockPerformanceTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation LockPerformanceTests
16 |
17 | - (void)setUp
18 | {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown
24 | {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | [super tearDown];
27 | }
28 |
29 | - (void)testExample
30 | {
31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/LockPerformance/LockPerformance/LockPerformance-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | NyK.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | LockTest
2 | ========
3 |
4 | Cocoa offers us several ways to implement locking strategies.
5 | Performance is one of the aspects that should be also considered before chosing one way or the other.
6 |
7 | The app performs benchmark tests on various locking patterns:
8 | - @synchronized keyword
9 | - NSLock
10 | - NSRecursiveLock
11 | - dispatch_sync
12 | - pthread_mutex_t
13 |
14 | The app displays the results in the console.
15 | The numbers below reflect the averaged results of several test runs executed on an iPhone 5s device. Note that each benchmark test performed 100 lock/unlock cycles.
16 |
17 | The results
18 | ===========
19 | 1. 69 ns -> dispatch_sync
20 | 2. 202 ns -> pthread_mutex_t
21 | 3. 262 ns -> NSLock
22 | 4. 263 ns -> NSRecursiveLock
23 | 5. 520 ns -> @synchronized keyword
24 |
25 | It turns out that @synchronized is the slowest, whilst dispatch_sync is blazingly fast. NSLock and NSRecursiveLock show no comparable difference, whilst pthread_mutex_t came in the second.
26 |
27 | 
28 |
29 | Measurements are performed using dispatch_benchmark, which is an easy to use, block-based API.
30 | Unfortunately it is not public (although documented), so *do not use dispatch_benchmark in productive code*.
31 | Useful links:
32 | - http://nshipster.com/benchmarking/
33 | - http://perpendiculo.us/2009/09/synchronized-nslock-pthread-osspinlock-showdown-done-right/
34 |
--------------------------------------------------------------------------------
/LockPerformance/LockPerformance/NYKAppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // NYKAppDelegate.m
3 | // LockPerformance
4 | //
5 | // Created by Nyisztor Karoly on 2014.05.26..
6 | // Copyright (c) 2014 NyK. All rights reserved.
7 | //
8 |
9 | #import "NYKAppDelegate.h"
10 | #import "NYKLockTest.h"
11 |
12 | @implementation NYKAppDelegate
13 |
14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
15 | {
16 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
17 | // Override point for customization after application launch.
18 | self.window.backgroundColor = [UIColor whiteColor];
19 | [self.window makeKeyAndVisible];
20 |
21 | // Benchmark Setup and Execution
22 | // Results will be displayed in the XCode console
23 | [NYKLockTest setExecutionCount:100];
24 | [NYKLockTest runSuite];
25 |
26 | return YES;
27 | }
28 |
29 | - (void)applicationWillResignActive:(UIApplication *)application
30 | {
31 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
32 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
33 | }
34 |
35 | - (void)applicationDidEnterBackground:(UIApplication *)application
36 | {
37 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
38 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
39 | }
40 |
41 | - (void)applicationWillEnterForeground:(UIApplication *)application
42 | {
43 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
44 | }
45 |
46 | - (void)applicationDidBecomeActive:(UIApplication *)application
47 | {
48 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
49 | }
50 |
51 | - (void)applicationWillTerminate:(UIApplication *)application
52 | {
53 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
54 | }
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/LockPerformance/LockPerformance/NYKLockTest.h:
--------------------------------------------------------------------------------
1 | //
2 | // NYKLockTest.h
3 | // LockPerformance
4 | //
5 | // Created by Nyisztor Karoly on 2014.05.26..
6 | // Copyright (c) 2014 NyK. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NYKLockTest : NSObject
12 |
13 | #pragma mark - Benchmark Setup and Execution
14 | /**
15 | * Sets how many times the benchmarked code shall be executed
16 | * Defaults to 10
17 | *
18 | * @param count_in
19 | */
20 | +(void) setExecutionCount:(NSUInteger)count_in;
21 |
22 | /**
23 | * Runs all benchmark tests
24 | * Results will be displayed in the console
25 | */
26 | +(void) runSuite;
27 |
28 | #pragma mark - Benchmark Methods
29 |
30 | /**
31 | * Tests @synchronized performance
32 | *
33 | * @param execCount_in number of times to execute the benchmark code
34 | */
35 | +(void) testSynchronizedPerformance:(NSUInteger)execCount_in;
36 |
37 | /**
38 | * Tests NSLock performance
39 | *
40 | * @param execCount_in number of times to execute the benchmark code
41 | */
42 | +(void) testNSLockPerformance:(NSUInteger)execCount_in;
43 |
44 | /**
45 | * Tests NSRecursiveLock performance
46 | *
47 | * @param execCount_in number of times to execute the benchmark code
48 | */
49 | +(void) testNSRecursiveLockPerformance:(NSUInteger)execCount_in;
50 |
51 | /**
52 | * Tests dispatch_sync performance
53 | *
54 | * @param execCount_in number of times to execute the benchmark code
55 | */
56 | +(void) testDispatchSyncPerformance:(NSUInteger)execCount_in;
57 |
58 | /**
59 | * Tests dispatch_async performance
60 | *
61 | * @param execCount_in number of times to execute the benchmark code
62 | */
63 | +(void) testDispatchAsyncPerformance:(NSUInteger)execCount_in;
64 |
65 | /**
66 | * Tests pthread_mutex_t performance
67 | *
68 | * @param execCount_in number of times to execute the benchmark code
69 | */
70 | +(void) testPThreadMutexPerformance:(NSUInteger)execCount_in;
71 |
72 | /**
73 | * Tests performance of NSLock with added exception handling
74 | *
75 | * @param execCount_in number of times to execute the benchmark code
76 | */
77 | +(void) testNSLockWithExceptionHandlingPerformance:(NSUInteger)execCount_in;
78 |
79 | /**
80 | * Tests performance of NSRecursiveLock with added exception handling
81 | *
82 | * @param execCount_in number of times to execute the benchmark code
83 | */
84 | +(void) testNSRecursiveLockWithExceptionHandlingPerformance:(NSUInteger)execCount_in;
85 |
86 | /**
87 | * Tests performance of pthread_mutex_t with added exception handling
88 | *
89 | * @param execCount_in number of times to execute the benchmark code
90 | */
91 | +(void) testPThreadMutexWithExceptionHandlingPerformance:(NSUInteger)execCount_in;
92 |
93 | @end
94 |
--------------------------------------------------------------------------------
/LockPerformance/LockPerformance/NYKLockTest.m:
--------------------------------------------------------------------------------
1 | //
2 | // NYKLockTest.m
3 | // LockPerformance
4 | //
5 | // Created by Nyisztor Karoly on 2014.05.26..
6 | // Copyright (c) 2014 NyK. All rights reserved.
7 | //
8 |
9 | #import "NYKLockTest.h"
10 | #import
11 | /**
12 | * Declares the dispatch_benchmark function
13 | * Although it is part of libdispatch (GCD), it is not a public function
14 | * that's why we must declare it here
15 | *
16 | * @param count determines how many times the block gets executed
17 | * @param ^blockvoid block to be executed
18 | *
19 | * @return block execution time in nanoseconds (10^(-9) s)
20 | */
21 | #warning dispatch_benchmark is a *private* libdispatch function, use it only during development\
22 | Leaving calls to dispatch_benchmark in productive code will most probably lead to your app being rejected!
23 |
24 | extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
25 |
26 | static NSUInteger S_EXEC_COUNT = 10;
27 | static BOOL s_DisplayResults;
28 | static NSLock* s_Lock;
29 | static NSRecursiveLock* s_RecursiveLock;
30 | static pthread_mutex_t s_Mutex;
31 | static dispatch_queue_t s_GlobalQueue;
32 |
33 | @implementation NYKLockTest
34 |
35 | #pragma mark - Benchmark Setup and Execution
36 |
37 | /**
38 | * Initializes the locks and mutextes
39 | * @remark Initializations extracted in order to keep benchmark methods clean
40 | */
41 | +(void) initialize
42 | {
43 | s_Lock = [NSLock new];
44 | s_RecursiveLock = [NSRecursiveLock new];
45 | pthread_mutex_init ( &s_Mutex, NULL);
46 | s_GlobalQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
47 | }
48 | /**
49 | * Sets how many times the benchmarked code shall be executed
50 | * Defaults to 10
51 | *
52 | * @param count_in
53 | */
54 | +(void) setExecutionCount:(NSUInteger)count_in;
55 | {
56 | S_EXEC_COUNT = count_in;
57 | }
58 |
59 | /**
60 | * Runs all benchmark tests
61 | * Results will be displayed in the console
62 | */
63 | +(void) runSuite;
64 | {
65 | [self warmUp];
66 |
67 | // Now let's run our performance tests
68 | NSLog( @"%@", @"\nBenchmark test suite start\n--------------------------" );
69 | s_DisplayResults = YES;
70 | [NYKLockTest testSynchronizedPerformance:S_EXEC_COUNT];
71 | [NYKLockTest testNSLockPerformance:S_EXEC_COUNT];
72 | [NYKLockTest testNSRecursiveLockPerformance:S_EXEC_COUNT];
73 | [NYKLockTest testDispatchSyncPerformance:S_EXEC_COUNT];
74 | // [NYKLockTest testDispatchAsyncPerformance:S_EXEC_COUNT];
75 | [NYKLockTest testPThreadMutexPerformance:S_EXEC_COUNT];
76 | // [NYKLockTest testNSLockWithExceptionHandlingPerformance:S_EXEC_COUNT];
77 | // [NYKLockTest testNSRecursiveLockWithExceptionHandlingPerformance:S_EXEC_COUNT];
78 | // [NYKLockTest testPThreadMutexWithExceptionHandlingPerformance:S_EXEC_COUNT];
79 | NSLog( @"%@", @"\nBenchmark test suite end\n--------------------------" );
80 | }
81 |
82 | #pragma mark - Benchmark Methods
83 |
84 | /**
85 | * Tests @synchronized performance
86 | *
87 | * @param execCount_in number of times to execute the benchmark code
88 | */
89 | +(void) testSynchronizedPerformance:(NSUInteger)execCount_in
90 | {
91 | uint64_t t = dispatch_benchmark(execCount_in, ^{
92 | @synchronized( self )
93 | {
94 | [NYKLockTest dummy];
95 | }
96 | });
97 |
98 | if( s_DisplayResults )
99 | {
100 | NSLog(@"@synchronized Avg. Runtime: %llu ns", t);
101 | }
102 | }
103 |
104 | /**
105 | * Tests NSLock performance
106 | *
107 | * @param execCount_in number of times to execute the benchmark code
108 | */
109 | +(void) testNSLockPerformance:(NSUInteger)execCount_in
110 | {
111 | uint64_t t = dispatch_benchmark(execCount_in, ^{
112 | [s_Lock lock];
113 | [NYKLockTest dummy];
114 | [s_Lock unlock];
115 | });
116 |
117 | if( s_DisplayResults )
118 | {
119 | NSLog(@"NSLock Avg. Runtime: %llu ns", t);
120 | }
121 | }
122 |
123 | /**
124 | * Tests NSRecursiveLock performance
125 | *
126 | * @param execCount_in number of times to execute the benchmark code
127 | */
128 | +(void) testNSRecursiveLockPerformance:(NSUInteger)execCount_in
129 | {
130 | uint64_t t = dispatch_benchmark(execCount_in, ^{
131 | [s_RecursiveLock lock];
132 | [NYKLockTest dummy];
133 | [s_RecursiveLock unlock];
134 | });
135 |
136 | if( s_DisplayResults )
137 | {
138 | NSLog(@"NSRecursiveLock Avg. Runtime: %llu ns", t);
139 | }
140 | }
141 |
142 | /**
143 | * Tests dispatch_sync performance
144 | *
145 | * @param execCount_in number of times to execute the benchmark code
146 | */
147 | +(void) testDispatchSyncPerformance:(NSUInteger)execCount_in
148 | {
149 | uint64_t t = dispatch_benchmark(execCount_in, ^{
150 | dispatch_sync(s_GlobalQueue, ^{
151 | [NYKLockTest dummy];
152 | });
153 | });
154 |
155 | if( s_DisplayResults )
156 | {
157 | NSLog(@"dispatch_sync Avg. Runtime: %llu ns", t);
158 | }
159 | }
160 |
161 | /**
162 | * Tests dispatch_async performance
163 | *
164 | * @param execCount_in number of times to execute the benchmark code
165 | */
166 | +(void) testDispatchAsyncPerformance:(NSUInteger)execCount_in
167 | {
168 | uint64_t t = dispatch_benchmark(execCount_in, ^{
169 | dispatch_async(s_GlobalQueue, ^{
170 | [NYKLockTest dummy];
171 | });
172 | });
173 |
174 | if( s_DisplayResults )
175 | {
176 | NSLog(@"dispatch_async Avg. Runtime: %llu ns", t);
177 | }
178 | }
179 |
180 |
181 | /**
182 | * Tests pthread_mutex_t performance
183 | *
184 | * @param execCount_in number of times to execute the benchmark code
185 | */
186 | +(void) testPThreadMutexPerformance:(NSUInteger)execCount_in
187 | {
188 | uint64_t t = dispatch_benchmark(execCount_in, ^{
189 | pthread_mutex_lock( (pthread_mutex_t*)&s_Mutex );
190 | [NYKLockTest dummy];
191 | pthread_mutex_unlock( (pthread_mutex_t*)&s_Mutex );
192 | });
193 |
194 | if( s_DisplayResults )
195 | {
196 | NSLog(@"pthread_mutex_t Avg. Runtime: %llu ns", t);
197 | }
198 | }
199 |
200 | /**
201 | * Tests performance of NSLock with added exception handling
202 | *
203 | * @param execCount_in number of times to execute the benchmark code
204 | */
205 | +(void) testNSLockWithExceptionHandlingPerformance:(NSUInteger)execCount_in
206 | {
207 | uint64_t t = dispatch_benchmark(execCount_in, ^{
208 | [s_Lock lock];
209 | @try
210 | {
211 | [NYKLockTest dummy];
212 | }
213 | @catch (NSException *exception)
214 | {
215 | // dummy
216 | [exception.description length];
217 | }
218 | [s_Lock unlock];
219 | });
220 |
221 | if( s_DisplayResults )
222 | {
223 | NSLog(@"NSLock with exception handling Avg. Runtime: %llu ns", t);
224 | }
225 | }
226 |
227 | /**
228 | * Tests performance of NSRecursiveLock with added exception handling
229 | *
230 | * @param execCount_in number of times to execute the benchmark code
231 | */
232 | +(void) testNSRecursiveLockWithExceptionHandlingPerformance:(NSUInteger)execCount_in
233 | {
234 | uint64_t t = dispatch_benchmark(execCount_in, ^{
235 | [s_RecursiveLock lock];
236 |
237 | @try
238 | {
239 | [NYKLockTest dummy];
240 | }
241 | @catch (NSException *exception)
242 | {
243 | // dummy
244 | [exception.description length];
245 | }
246 |
247 | [s_RecursiveLock unlock];
248 | });
249 |
250 | if( s_DisplayResults )
251 | {
252 | NSLog(@"NSRecursiveLock with exception handling Avg. Runtime: %llu ns", t);
253 | }
254 | }
255 |
256 | /**
257 | * Tests performance of pthread_mutex_t with added exception handling
258 | *
259 | * @param execCount_in number of times to execute the benchmark code
260 | */
261 | +(void) testPThreadMutexWithExceptionHandlingPerformance:(NSUInteger)execCount_in
262 | {
263 | uint64_t t = dispatch_benchmark(execCount_in, ^{
264 | pthread_mutex_lock( (pthread_mutex_t*)&s_Mutex );
265 | @try
266 | {
267 | [NYKLockTest dummy];
268 | }
269 | @catch (NSException *exception)
270 | {
271 | // dummy
272 | [exception.description length];
273 | }
274 |
275 | pthread_mutex_unlock( (pthread_mutex_t*)&s_Mutex );
276 | });
277 |
278 | if( s_DisplayResults )
279 | {
280 | NSLog(@"pthread_mutex_t with exception handling Avg. Runtime: %llu ns", t);
281 | }
282 | }
283 |
284 | #pragma mark - Helper Methods
285 | /**
286 | * Does nothing, intended to prevent compiler optimization for nop code
287 | *
288 | * @return <#return value description#>
289 | */
290 | +(NSUInteger) dummy
291 | {
292 | NSString* str = @"Dummy";
293 | return [str length];
294 | }
295 |
296 | /**
297 | * Performs some initial test rounds to warm up the engine
298 | * This is required due to get real results - comment out to see the results without this step
299 | * Results won't show up in the console
300 | */
301 | +(void) warmUp
302 | {
303 | s_DisplayResults = NO;
304 |
305 | NSUInteger testRunCount = 10;
306 | [NYKLockTest testSynchronizedPerformance:testRunCount];
307 | [NYKLockTest testNSLockPerformance:testRunCount];
308 | [NYKLockTest testNSRecursiveLockPerformance:testRunCount];
309 | [NYKLockTest testDispatchSyncPerformance:testRunCount];
310 | // [NYKLockTest testDispatchAsyncPerformance:testRunCount];
311 | [NYKLockTest testPThreadMutexPerformance:testRunCount];
312 | // [NYKLockTest testNSLockWithExceptionHandlingPerformance:testRunCount];
313 | // [NYKLockTest testNSRecursiveLockWithExceptionHandlingPerformance:testRunCount];
314 | // [NYKLockTest testPThreadMutexWithExceptionHandlingPerformance:testRunCount];
315 | }
316 |
317 | @end
318 |
--------------------------------------------------------------------------------
/LockPerformance/LockPerformance.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 26D51AF119333DD200C7B286 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26D51AF019333DD200C7B286 /* Foundation.framework */; };
11 | 26D51AF319333DD200C7B286 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26D51AF219333DD200C7B286 /* CoreGraphics.framework */; };
12 | 26D51AF519333DD200C7B286 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26D51AF419333DD200C7B286 /* UIKit.framework */; };
13 | 26D51AFB19333DD200C7B286 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 26D51AF919333DD200C7B286 /* InfoPlist.strings */; };
14 | 26D51AFD19333DD200C7B286 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 26D51AFC19333DD200C7B286 /* main.m */; };
15 | 26D51B0119333DD200C7B286 /* NYKAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 26D51B0019333DD200C7B286 /* NYKAppDelegate.m */; };
16 | 26D51B0319333DD200C7B286 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 26D51B0219333DD200C7B286 /* Images.xcassets */; };
17 | 26D51B0A19333DD200C7B286 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26D51B0919333DD200C7B286 /* XCTest.framework */; };
18 | 26D51B0B19333DD200C7B286 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26D51AF019333DD200C7B286 /* Foundation.framework */; };
19 | 26D51B0C19333DD200C7B286 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26D51AF419333DD200C7B286 /* UIKit.framework */; };
20 | 26D51B1419333DD200C7B286 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 26D51B1219333DD200C7B286 /* InfoPlist.strings */; };
21 | 26D51B1619333DD200C7B286 /* LockPerformanceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 26D51B1519333DD200C7B286 /* LockPerformanceTests.m */; };
22 | 26D51B2119333E0900C7B286 /* NYKLockTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 26D51B2019333E0900C7B286 /* NYKLockTest.m */; };
23 | /* End PBXBuildFile section */
24 |
25 | /* Begin PBXContainerItemProxy section */
26 | 26D51B0D19333DD200C7B286 /* PBXContainerItemProxy */ = {
27 | isa = PBXContainerItemProxy;
28 | containerPortal = 26D51AE519333DD100C7B286 /* Project object */;
29 | proxyType = 1;
30 | remoteGlobalIDString = 26D51AEC19333DD200C7B286;
31 | remoteInfo = LockPerformance;
32 | };
33 | /* End PBXContainerItemProxy section */
34 |
35 | /* Begin PBXFileReference section */
36 | 26D51AED19333DD200C7B286 /* LockPerformance.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LockPerformance.app; sourceTree = BUILT_PRODUCTS_DIR; };
37 | 26D51AF019333DD200C7B286 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
38 | 26D51AF219333DD200C7B286 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
39 | 26D51AF419333DD200C7B286 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
40 | 26D51AF819333DD200C7B286 /* LockPerformance-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "LockPerformance-Info.plist"; sourceTree = ""; };
41 | 26D51AFA19333DD200C7B286 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
42 | 26D51AFC19333DD200C7B286 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
43 | 26D51AFE19333DD200C7B286 /* LockPerformance-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "LockPerformance-Prefix.pch"; sourceTree = ""; };
44 | 26D51AFF19333DD200C7B286 /* NYKAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYKAppDelegate.h; sourceTree = ""; };
45 | 26D51B0019333DD200C7B286 /* NYKAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NYKAppDelegate.m; sourceTree = ""; };
46 | 26D51B0219333DD200C7B286 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
47 | 26D51B0819333DD200C7B286 /* LockPerformanceTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LockPerformanceTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
48 | 26D51B0919333DD200C7B286 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
49 | 26D51B1119333DD200C7B286 /* LockPerformanceTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "LockPerformanceTests-Info.plist"; sourceTree = ""; };
50 | 26D51B1319333DD200C7B286 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
51 | 26D51B1519333DD200C7B286 /* LockPerformanceTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LockPerformanceTests.m; sourceTree = ""; };
52 | 26D51B1F19333E0900C7B286 /* NYKLockTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NYKLockTest.h; sourceTree = ""; };
53 | 26D51B2019333E0900C7B286 /* NYKLockTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NYKLockTest.m; sourceTree = ""; };
54 | /* End PBXFileReference section */
55 |
56 | /* Begin PBXFrameworksBuildPhase section */
57 | 26D51AEA19333DD200C7B286 /* Frameworks */ = {
58 | isa = PBXFrameworksBuildPhase;
59 | buildActionMask = 2147483647;
60 | files = (
61 | 26D51AF319333DD200C7B286 /* CoreGraphics.framework in Frameworks */,
62 | 26D51AF519333DD200C7B286 /* UIKit.framework in Frameworks */,
63 | 26D51AF119333DD200C7B286 /* Foundation.framework in Frameworks */,
64 | );
65 | runOnlyForDeploymentPostprocessing = 0;
66 | };
67 | 26D51B0519333DD200C7B286 /* Frameworks */ = {
68 | isa = PBXFrameworksBuildPhase;
69 | buildActionMask = 2147483647;
70 | files = (
71 | 26D51B0A19333DD200C7B286 /* XCTest.framework in Frameworks */,
72 | 26D51B0C19333DD200C7B286 /* UIKit.framework in Frameworks */,
73 | 26D51B0B19333DD200C7B286 /* Foundation.framework in Frameworks */,
74 | );
75 | runOnlyForDeploymentPostprocessing = 0;
76 | };
77 | /* End PBXFrameworksBuildPhase section */
78 |
79 | /* Begin PBXGroup section */
80 | 26D51AE419333DD100C7B286 = {
81 | isa = PBXGroup;
82 | children = (
83 | 26D51AF619333DD200C7B286 /* LockPerformance */,
84 | 26D51B0F19333DD200C7B286 /* LockPerformanceTests */,
85 | 26D51AEF19333DD200C7B286 /* Frameworks */,
86 | 26D51AEE19333DD200C7B286 /* Products */,
87 | );
88 | sourceTree = "";
89 | };
90 | 26D51AEE19333DD200C7B286 /* Products */ = {
91 | isa = PBXGroup;
92 | children = (
93 | 26D51AED19333DD200C7B286 /* LockPerformance.app */,
94 | 26D51B0819333DD200C7B286 /* LockPerformanceTests.xctest */,
95 | );
96 | name = Products;
97 | sourceTree = "";
98 | };
99 | 26D51AEF19333DD200C7B286 /* Frameworks */ = {
100 | isa = PBXGroup;
101 | children = (
102 | 26D51AF019333DD200C7B286 /* Foundation.framework */,
103 | 26D51AF219333DD200C7B286 /* CoreGraphics.framework */,
104 | 26D51AF419333DD200C7B286 /* UIKit.framework */,
105 | 26D51B0919333DD200C7B286 /* XCTest.framework */,
106 | );
107 | name = Frameworks;
108 | sourceTree = "";
109 | };
110 | 26D51AF619333DD200C7B286 /* LockPerformance */ = {
111 | isa = PBXGroup;
112 | children = (
113 | 26D51AFF19333DD200C7B286 /* NYKAppDelegate.h */,
114 | 26D51B0019333DD200C7B286 /* NYKAppDelegate.m */,
115 | 26D51B0219333DD200C7B286 /* Images.xcassets */,
116 | 26D51AF719333DD200C7B286 /* Supporting Files */,
117 | 26D51B1F19333E0900C7B286 /* NYKLockTest.h */,
118 | 26D51B2019333E0900C7B286 /* NYKLockTest.m */,
119 | );
120 | path = LockPerformance;
121 | sourceTree = "";
122 | };
123 | 26D51AF719333DD200C7B286 /* Supporting Files */ = {
124 | isa = PBXGroup;
125 | children = (
126 | 26D51AF819333DD200C7B286 /* LockPerformance-Info.plist */,
127 | 26D51AF919333DD200C7B286 /* InfoPlist.strings */,
128 | 26D51AFC19333DD200C7B286 /* main.m */,
129 | 26D51AFE19333DD200C7B286 /* LockPerformance-Prefix.pch */,
130 | );
131 | name = "Supporting Files";
132 | sourceTree = "";
133 | };
134 | 26D51B0F19333DD200C7B286 /* LockPerformanceTests */ = {
135 | isa = PBXGroup;
136 | children = (
137 | 26D51B1519333DD200C7B286 /* LockPerformanceTests.m */,
138 | 26D51B1019333DD200C7B286 /* Supporting Files */,
139 | );
140 | path = LockPerformanceTests;
141 | sourceTree = "";
142 | };
143 | 26D51B1019333DD200C7B286 /* Supporting Files */ = {
144 | isa = PBXGroup;
145 | children = (
146 | 26D51B1119333DD200C7B286 /* LockPerformanceTests-Info.plist */,
147 | 26D51B1219333DD200C7B286 /* InfoPlist.strings */,
148 | );
149 | name = "Supporting Files";
150 | sourceTree = "";
151 | };
152 | /* End PBXGroup section */
153 |
154 | /* Begin PBXNativeTarget section */
155 | 26D51AEC19333DD200C7B286 /* LockPerformance */ = {
156 | isa = PBXNativeTarget;
157 | buildConfigurationList = 26D51B1919333DD200C7B286 /* Build configuration list for PBXNativeTarget "LockPerformance" */;
158 | buildPhases = (
159 | 26D51AE919333DD200C7B286 /* Sources */,
160 | 26D51AEA19333DD200C7B286 /* Frameworks */,
161 | 26D51AEB19333DD200C7B286 /* Resources */,
162 | );
163 | buildRules = (
164 | );
165 | dependencies = (
166 | );
167 | name = LockPerformance;
168 | productName = LockPerformance;
169 | productReference = 26D51AED19333DD200C7B286 /* LockPerformance.app */;
170 | productType = "com.apple.product-type.application";
171 | };
172 | 26D51B0719333DD200C7B286 /* LockPerformanceTests */ = {
173 | isa = PBXNativeTarget;
174 | buildConfigurationList = 26D51B1C19333DD200C7B286 /* Build configuration list for PBXNativeTarget "LockPerformanceTests" */;
175 | buildPhases = (
176 | 26D51B0419333DD200C7B286 /* Sources */,
177 | 26D51B0519333DD200C7B286 /* Frameworks */,
178 | 26D51B0619333DD200C7B286 /* Resources */,
179 | );
180 | buildRules = (
181 | );
182 | dependencies = (
183 | 26D51B0E19333DD200C7B286 /* PBXTargetDependency */,
184 | );
185 | name = LockPerformanceTests;
186 | productName = LockPerformanceTests;
187 | productReference = 26D51B0819333DD200C7B286 /* LockPerformanceTests.xctest */;
188 | productType = "com.apple.product-type.bundle.unit-test";
189 | };
190 | /* End PBXNativeTarget section */
191 |
192 | /* Begin PBXProject section */
193 | 26D51AE519333DD100C7B286 /* Project object */ = {
194 | isa = PBXProject;
195 | attributes = {
196 | CLASSPREFIX = NYK;
197 | LastUpgradeCheck = 0510;
198 | ORGANIZATIONNAME = NyK;
199 | TargetAttributes = {
200 | 26D51B0719333DD200C7B286 = {
201 | TestTargetID = 26D51AEC19333DD200C7B286;
202 | };
203 | };
204 | };
205 | buildConfigurationList = 26D51AE819333DD100C7B286 /* Build configuration list for PBXProject "LockPerformance" */;
206 | compatibilityVersion = "Xcode 3.2";
207 | developmentRegion = English;
208 | hasScannedForEncodings = 0;
209 | knownRegions = (
210 | en,
211 | );
212 | mainGroup = 26D51AE419333DD100C7B286;
213 | productRefGroup = 26D51AEE19333DD200C7B286 /* Products */;
214 | projectDirPath = "";
215 | projectRoot = "";
216 | targets = (
217 | 26D51AEC19333DD200C7B286 /* LockPerformance */,
218 | 26D51B0719333DD200C7B286 /* LockPerformanceTests */,
219 | );
220 | };
221 | /* End PBXProject section */
222 |
223 | /* Begin PBXResourcesBuildPhase section */
224 | 26D51AEB19333DD200C7B286 /* Resources */ = {
225 | isa = PBXResourcesBuildPhase;
226 | buildActionMask = 2147483647;
227 | files = (
228 | 26D51AFB19333DD200C7B286 /* InfoPlist.strings in Resources */,
229 | 26D51B0319333DD200C7B286 /* Images.xcassets in Resources */,
230 | );
231 | runOnlyForDeploymentPostprocessing = 0;
232 | };
233 | 26D51B0619333DD200C7B286 /* Resources */ = {
234 | isa = PBXResourcesBuildPhase;
235 | buildActionMask = 2147483647;
236 | files = (
237 | 26D51B1419333DD200C7B286 /* InfoPlist.strings in Resources */,
238 | );
239 | runOnlyForDeploymentPostprocessing = 0;
240 | };
241 | /* End PBXResourcesBuildPhase section */
242 |
243 | /* Begin PBXSourcesBuildPhase section */
244 | 26D51AE919333DD200C7B286 /* Sources */ = {
245 | isa = PBXSourcesBuildPhase;
246 | buildActionMask = 2147483647;
247 | files = (
248 | 26D51AFD19333DD200C7B286 /* main.m in Sources */,
249 | 26D51B2119333E0900C7B286 /* NYKLockTest.m in Sources */,
250 | 26D51B0119333DD200C7B286 /* NYKAppDelegate.m in Sources */,
251 | );
252 | runOnlyForDeploymentPostprocessing = 0;
253 | };
254 | 26D51B0419333DD200C7B286 /* Sources */ = {
255 | isa = PBXSourcesBuildPhase;
256 | buildActionMask = 2147483647;
257 | files = (
258 | 26D51B1619333DD200C7B286 /* LockPerformanceTests.m in Sources */,
259 | );
260 | runOnlyForDeploymentPostprocessing = 0;
261 | };
262 | /* End PBXSourcesBuildPhase section */
263 |
264 | /* Begin PBXTargetDependency section */
265 | 26D51B0E19333DD200C7B286 /* PBXTargetDependency */ = {
266 | isa = PBXTargetDependency;
267 | target = 26D51AEC19333DD200C7B286 /* LockPerformance */;
268 | targetProxy = 26D51B0D19333DD200C7B286 /* PBXContainerItemProxy */;
269 | };
270 | /* End PBXTargetDependency section */
271 |
272 | /* Begin PBXVariantGroup section */
273 | 26D51AF919333DD200C7B286 /* InfoPlist.strings */ = {
274 | isa = PBXVariantGroup;
275 | children = (
276 | 26D51AFA19333DD200C7B286 /* en */,
277 | );
278 | name = InfoPlist.strings;
279 | sourceTree = "";
280 | };
281 | 26D51B1219333DD200C7B286 /* InfoPlist.strings */ = {
282 | isa = PBXVariantGroup;
283 | children = (
284 | 26D51B1319333DD200C7B286 /* en */,
285 | );
286 | name = InfoPlist.strings;
287 | sourceTree = "";
288 | };
289 | /* End PBXVariantGroup section */
290 |
291 | /* Begin XCBuildConfiguration section */
292 | 26D51B1719333DD200C7B286 /* Debug */ = {
293 | isa = XCBuildConfiguration;
294 | buildSettings = {
295 | ALWAYS_SEARCH_USER_PATHS = NO;
296 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
297 | CLANG_CXX_LIBRARY = "libc++";
298 | CLANG_ENABLE_MODULES = YES;
299 | CLANG_ENABLE_OBJC_ARC = YES;
300 | CLANG_WARN_BOOL_CONVERSION = YES;
301 | CLANG_WARN_CONSTANT_CONVERSION = YES;
302 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
303 | CLANG_WARN_EMPTY_BODY = YES;
304 | CLANG_WARN_ENUM_CONVERSION = YES;
305 | CLANG_WARN_INT_CONVERSION = YES;
306 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
307 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
308 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
309 | COPY_PHASE_STRIP = NO;
310 | GCC_C_LANGUAGE_STANDARD = gnu99;
311 | GCC_DYNAMIC_NO_PIC = NO;
312 | GCC_OPTIMIZATION_LEVEL = 0;
313 | GCC_PREPROCESSOR_DEFINITIONS = (
314 | "DEBUG=1",
315 | "$(inherited)",
316 | );
317 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
318 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
319 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
320 | GCC_WARN_UNDECLARED_SELECTOR = YES;
321 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
322 | GCC_WARN_UNUSED_FUNCTION = YES;
323 | GCC_WARN_UNUSED_VARIABLE = YES;
324 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
325 | ONLY_ACTIVE_ARCH = YES;
326 | SDKROOT = iphoneos;
327 | };
328 | name = Debug;
329 | };
330 | 26D51B1819333DD200C7B286 /* Release */ = {
331 | isa = XCBuildConfiguration;
332 | buildSettings = {
333 | ALWAYS_SEARCH_USER_PATHS = NO;
334 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
335 | CLANG_CXX_LIBRARY = "libc++";
336 | CLANG_ENABLE_MODULES = YES;
337 | CLANG_ENABLE_OBJC_ARC = YES;
338 | CLANG_WARN_BOOL_CONVERSION = YES;
339 | CLANG_WARN_CONSTANT_CONVERSION = YES;
340 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
341 | CLANG_WARN_EMPTY_BODY = YES;
342 | CLANG_WARN_ENUM_CONVERSION = YES;
343 | CLANG_WARN_INT_CONVERSION = YES;
344 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
345 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
346 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
347 | COPY_PHASE_STRIP = YES;
348 | ENABLE_NS_ASSERTIONS = NO;
349 | GCC_C_LANGUAGE_STANDARD = gnu99;
350 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
351 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
352 | GCC_WARN_UNDECLARED_SELECTOR = YES;
353 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
354 | GCC_WARN_UNUSED_FUNCTION = YES;
355 | GCC_WARN_UNUSED_VARIABLE = YES;
356 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
357 | SDKROOT = iphoneos;
358 | VALIDATE_PRODUCT = YES;
359 | };
360 | name = Release;
361 | };
362 | 26D51B1A19333DD200C7B286 /* Debug */ = {
363 | isa = XCBuildConfiguration;
364 | buildSettings = {
365 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
366 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
367 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
368 | GCC_PREFIX_HEADER = "LockPerformance/LockPerformance-Prefix.pch";
369 | INFOPLIST_FILE = "LockPerformance/LockPerformance-Info.plist";
370 | PRODUCT_NAME = "$(TARGET_NAME)";
371 | WRAPPER_EXTENSION = app;
372 | };
373 | name = Debug;
374 | };
375 | 26D51B1B19333DD200C7B286 /* Release */ = {
376 | isa = XCBuildConfiguration;
377 | buildSettings = {
378 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
379 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
380 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
381 | GCC_PREFIX_HEADER = "LockPerformance/LockPerformance-Prefix.pch";
382 | INFOPLIST_FILE = "LockPerformance/LockPerformance-Info.plist";
383 | PRODUCT_NAME = "$(TARGET_NAME)";
384 | WRAPPER_EXTENSION = app;
385 | };
386 | name = Release;
387 | };
388 | 26D51B1D19333DD200C7B286 /* Debug */ = {
389 | isa = XCBuildConfiguration;
390 | buildSettings = {
391 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/LockPerformance.app/LockPerformance";
392 | FRAMEWORK_SEARCH_PATHS = (
393 | "$(SDKROOT)/Developer/Library/Frameworks",
394 | "$(inherited)",
395 | "$(DEVELOPER_FRAMEWORKS_DIR)",
396 | );
397 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
398 | GCC_PREFIX_HEADER = "LockPerformance/LockPerformance-Prefix.pch";
399 | GCC_PREPROCESSOR_DEFINITIONS = (
400 | "DEBUG=1",
401 | "$(inherited)",
402 | );
403 | INFOPLIST_FILE = "LockPerformanceTests/LockPerformanceTests-Info.plist";
404 | PRODUCT_NAME = "$(TARGET_NAME)";
405 | TEST_HOST = "$(BUNDLE_LOADER)";
406 | WRAPPER_EXTENSION = xctest;
407 | };
408 | name = Debug;
409 | };
410 | 26D51B1E19333DD200C7B286 /* Release */ = {
411 | isa = XCBuildConfiguration;
412 | buildSettings = {
413 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/LockPerformance.app/LockPerformance";
414 | FRAMEWORK_SEARCH_PATHS = (
415 | "$(SDKROOT)/Developer/Library/Frameworks",
416 | "$(inherited)",
417 | "$(DEVELOPER_FRAMEWORKS_DIR)",
418 | );
419 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
420 | GCC_PREFIX_HEADER = "LockPerformance/LockPerformance-Prefix.pch";
421 | INFOPLIST_FILE = "LockPerformanceTests/LockPerformanceTests-Info.plist";
422 | PRODUCT_NAME = "$(TARGET_NAME)";
423 | TEST_HOST = "$(BUNDLE_LOADER)";
424 | WRAPPER_EXTENSION = xctest;
425 | };
426 | name = Release;
427 | };
428 | /* End XCBuildConfiguration section */
429 |
430 | /* Begin XCConfigurationList section */
431 | 26D51AE819333DD100C7B286 /* Build configuration list for PBXProject "LockPerformance" */ = {
432 | isa = XCConfigurationList;
433 | buildConfigurations = (
434 | 26D51B1719333DD200C7B286 /* Debug */,
435 | 26D51B1819333DD200C7B286 /* Release */,
436 | );
437 | defaultConfigurationIsVisible = 0;
438 | defaultConfigurationName = Release;
439 | };
440 | 26D51B1919333DD200C7B286 /* Build configuration list for PBXNativeTarget "LockPerformance" */ = {
441 | isa = XCConfigurationList;
442 | buildConfigurations = (
443 | 26D51B1A19333DD200C7B286 /* Debug */,
444 | 26D51B1B19333DD200C7B286 /* Release */,
445 | );
446 | defaultConfigurationIsVisible = 0;
447 | };
448 | 26D51B1C19333DD200C7B286 /* Build configuration list for PBXNativeTarget "LockPerformanceTests" */ = {
449 | isa = XCConfigurationList;
450 | buildConfigurations = (
451 | 26D51B1D19333DD200C7B286 /* Debug */,
452 | 26D51B1E19333DD200C7B286 /* Release */,
453 | );
454 | defaultConfigurationIsVisible = 0;
455 | };
456 | /* End XCConfigurationList section */
457 | };
458 | rootObject = 26D51AE519333DD100C7B286 /* Project object */;
459 | }
460 |
--------------------------------------------------------------------------------