-int main(int argc, char **argv) {
- if (argc < 2) {
- printf("You should specify number of runs\n");
- exit(-1);
+uint getNumberOfRuns(){
+ uint runs = 0;
+ DIR *dir;
+ struct dirent *ent;
+ if ((dir = opendir ("./")) != NULL) {
+ /* print all the files and directories within directory */
+ while ((ent = readdir (dir)) != NULL) {
+ if(strstr(ent->d_name, "result") != NULL){
+ runs++;
+ }
+ }
+ closedir (dir);
+ } else {
+ perror ("Unable to open the directory\n");
+ exit(1);