Add new time
This commit is contained in:
parent
e9349bdcae
commit
0e089bb00a
@ -66,6 +66,9 @@ int main(int argc, char **argv) {
|
||||
int *matches = search_pattern(private_text, pattern, lps, &match_number, &residue);
|
||||
|
||||
search_for_splitted_pattern(&residue, &match_number, &matches);
|
||||
#ifdef TIME
|
||||
long_long stop_search = PAPI_get_real_usec();
|
||||
#endif
|
||||
|
||||
//free(private_text);
|
||||
|
||||
@ -75,6 +78,10 @@ int main(int argc, char **argv) {
|
||||
printf("%d -> result number: %d\n", rank, match_number);
|
||||
#endif
|
||||
|
||||
#ifdef TIME
|
||||
long_long start_collect = PAPI_get_real_usec();
|
||||
#endif
|
||||
|
||||
collect_results(&match_number, matches);
|
||||
|
||||
#ifdef TIME
|
||||
@ -92,7 +99,8 @@ int main(int argc, char **argv) {
|
||||
|
||||
#ifdef TIME
|
||||
printf("total elapsed: %d\n", end_time - start_time);
|
||||
printf("search elapsed: %d\n", end_time - start_search);
|
||||
printf("search elapsed: %d\n", stop_search - start_search);
|
||||
printf("collect elapsed: %d\n", end_time - start_collect);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user