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