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