From 824689fb465015b69d791c7bd6175aa5ecb4531e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 7 Oct 2020 16:09:01 +0200 Subject: Improve indexer speed profiling --- libcrystfel/src/index.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c index e16fd9c3..7379a462 100644 --- a/libcrystfel/src/index.c +++ b/libcrystfel/src/index.c @@ -711,9 +711,6 @@ static int try_indexer(struct image *image, IndexingMethod indm, #ifdef MEASURE_INDEX_TIME time_end = real_time(); - printf("%s took %f s, %i crystals found, %s %s\n", - indexer_str(indm & INDEXING_METHOD_MASK), - time_end - time_start, r, image->filename, image->ev); #endif /* Stop a really difficult to debug situation in its tracks */ @@ -800,6 +797,16 @@ static int try_indexer(struct image *image, IndexingMethod indm, n_bad = remove_flagged_crystals(image); assert(r >= n_bad); + #ifdef MEASURE_INDEX_TIME + printf("%s took %f s, %i crystals found of which %i accepted. %s %s\n", + indexer_str(indm & INDEXING_METHOD_MASK), + time_end - time_start, + r, r - n_bad, + image->filename, + image->ev); + fflush(stdout); + #endif + return r - n_bad; } -- cgit v1.2.3