xref: /xnu-8020.121.3/tools/tests/perf_index/PerfIndex_COPS_Module/PITest.h (revision fdd8201d7b966f0c3ea610489d29bd841d358941)
1*fdd8201dSApple OSS Distributions //
2*fdd8201dSApple OSS Distributions //  PITest.h
3*fdd8201dSApple OSS Distributions //  PerfIndex
4*fdd8201dSApple OSS Distributions //
5*fdd8201dSApple OSS Distributions //  Created by Mark Hamilton on 8/21/13.
6*fdd8201dSApple OSS Distributions //
7*fdd8201dSApple OSS Distributions //
8*fdd8201dSApple OSS Distributions 
9*fdd8201dSApple OSS Distributions #import <Foundation/Foundation.h>
10*fdd8201dSApple OSS Distributions #import "PerfIndex.h"
11*fdd8201dSApple OSS Distributions 
12*fdd8201dSApple OSS Distributions @interface PITest : NSObject <HGTest>
13*fdd8201dSApple OSS Distributions {
14*fdd8201dSApple OSS Distributions 	int (*setup_func)(int, long long, int, void**);
15*fdd8201dSApple OSS Distributions 	int (*execute_func)(int, int, long long, int, void**);
16*fdd8201dSApple OSS Distributions 	void (*cleanup_func)(int, long long);
17*fdd8201dSApple OSS Distributions 
18*fdd8201dSApple OSS Distributions 	long long length;
19*fdd8201dSApple OSS Distributions 	int numThreads;
20*fdd8201dSApple OSS Distributions 	int readyThreadCount;
21*fdd8201dSApple OSS Distributions 	int testArgc;
22*fdd8201dSApple OSS Distributions 	void** testArgv;
23*fdd8201dSApple OSS Distributions 	pthread_mutex_t readyThreadCountLock;
24*fdd8201dSApple OSS Distributions 	pthread_cond_t threadsReadyCvar;
25*fdd8201dSApple OSS Distributions 	pthread_cond_t startCvar;
26*fdd8201dSApple OSS Distributions 	pthread_t* threads;
27*fdd8201dSApple OSS Distributions }
28*fdd8201dSApple OSS Distributions 
29*fdd8201dSApple OSS Distributions @property NSString* testName;
30*fdd8201dSApple OSS Distributions 
31*fdd8201dSApple OSS Distributions - (BOOL)setup;
32*fdd8201dSApple OSS Distributions - (BOOL)execute;
33*fdd8201dSApple OSS Distributions - (void)cleanup;
34*fdd8201dSApple OSS Distributions 
35*fdd8201dSApple OSS Distributions 
36*fdd8201dSApple OSS Distributions @end
37