X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=lttv%2Flttv%2Fsync%2Fsync_chain_unittest.c;h=652c379752e71ed05b13e635c212c24688a01576;hb=0a87ec9a018cc9731ce3b04309eaa4dcc77df6d2;hp=9916591ce98224c91e75c6710b2a6ca46837af75;hpb=277e5b535febfb81a5e9485b0d008e148b6979ac;p=lttv.git diff --git a/lttv/lttv/sync/sync_chain_unittest.c b/lttv/lttv/sync/sync_chain_unittest.c index 9916591c..652c3797 100644 --- a/lttv/lttv/sync/sync_chain_unittest.c +++ b/lttv/lttv/sync/sync_chain_unittest.c @@ -100,11 +100,13 @@ int main(const int argc, char* const argv[]) struct timeval startTime, endTime; struct rusage startUsage, endUsage; GList* result; + GArray* factors; int retval; bool stats; const char* testCaseName; GString* analysisModulesNames; unsigned int id; + AllFactors* allFactors; /* * Initialize event modules @@ -207,7 +209,9 @@ int main(const int argc, char* const argv[]) syncState->analysisModule->initAnalysis(syncState); // Process traceset - syncState->processingModule->finalizeProcessing(syncState); + allFactors= syncState->processingModule->finalizeProcessing(syncState); + factors= reduceFactors(allFactors); + freeAllFactors(allFactors); // Write graphs file if (syncState->graphsStream) @@ -221,9 +225,19 @@ int main(const int argc, char* const argv[]) } // Print statistics - if (syncState->stats) + if (optionSyncStats.present) { + unsigned int i; + printStats(syncState); + + printf("Resulting synchronization factors:\n"); + for (i= 0; i < factors->len; i++) + { + Factors* traceFactors= &g_array_index(factors, Factors, i); + printf("\ttrace %u drift= %g offset= %g\n", i, + traceFactors->drift, traceFactors->offset); + } } // Destroy modules and clean up @@ -261,7 +275,7 @@ int main(const int argc, char* const argv[]) /* - * Read program arguments dans update ModuleOptions structures + * Read program arguments and update ModuleOptions structures * * Args: * argc, argv: standard argument arrays