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