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