broadcast);
static AllFactors* finalizeAnalysisEval(SyncState* const syncState);
static void printAnalysisStatsEval(SyncState* const syncState);
+static void writeAnalysisTraceTimeBackPlotsEval(SyncState* const syncState,
+ const unsigned int i, const unsigned int j);
+static void writeAnalysisTraceTimeForePlotsEval(SyncState* const syncState,
+ const unsigned int i, const unsigned int j);
// Functions specific to this module
static guint ghfRttKeyHash(gconstpointer key);
.analyzeBroadcast= &analyzeBroadcastEval,
.finalizeAnalysis= &finalizeAnalysisEval,
.printAnalysisStats= &printAnalysisStatsEval,
- .graphFunctions= {}
+ .graphFunctions= {
+ .writeTraceTimeBackPlots= &writeAnalysisTraceTimeBackPlotsEval,
+ .writeTraceTimeForePlots= &writeAnalysisTraceTimeForePlotsEval,
+ }
};
static ModuleOption optionEvalRttFile= {
if (syncState->graphsStream)
{
AnalysisGraphsEval* graphs= malloc(sizeof(AnalysisGraphsEval));
+ GList* result;
analysisData->graphs= graphs;
graphs->bounds[i][j].max= 0;
}
}
+
+ graphs->chullSS= (SyncState*) malloc(sizeof(SyncState));
+ memcpy(graphs->chullSS, syncState, sizeof(SyncState));
+ graphs->chullSS->analysisData= NULL;
+ result= g_queue_find_custom(&analysisModules, "chull", &gcfCompareAnalysis);
+ g_assert(result != NULL);
+ graphs->chullSS->analysisModule= (AnalysisModule*) result->data;
+ graphs->chullSS->analysisModule->initAnalysis(graphs->chullSS);
}
}
}
free(graphs->bounds);
+ graphs->chullSS->analysisModule->destroyAnalysis(graphs->chullSS);
+ free(graphs->chullSS);
+
free(graphs);
}
{
updateBounds(analysisData->graphs->bounds, message->inE,
message->outE);
+
+ analysisData->graphs->chullSS->analysisModule->analyzeMessage(analysisData->graphs->chullSS,
+ message);
}
}
{
AnalysisDataEval* analysisData= syncState->analysisData;
+ /* This function may be run twice because of matching_distributor. This
+ * check is there to make sure the next block is run only once.
+ */
if (syncState->graphsStream && analysisData->graphs->histograms)
{
g_hash_table_foreach(analysisData->graphs->histograms,
analysisData->rttInfo, .graphsStream= syncState->graphsStream});
g_hash_table_destroy(analysisData->graphs->histograms);
analysisData->graphs->histograms= NULL;
+
+ if (syncState->graphsStream)
+ {
+ SyncState* chullSS= analysisData->graphs->chullSS;
+
+ freeAllFactors(chullSS->analysisModule->finalizeAnalysis(chullSS),
+ chullSS->traceNb);
+ }
}
return createAllFactors(syncState->traceNb);
tpBounds->max= messageTime;
}
}
+
+
+/*
+ * Write the analysis-specific graph lines in the gnuplot script.
+ *
+ * Args:
+ * syncState: container for synchronization data
+ * i: first trace number
+ * j: second trace number, garanteed to be larger than i
+ */
+static void writeAnalysisTraceTimeBackPlotsEval(SyncState* const syncState,
+ const unsigned int i, const unsigned int j)
+{
+ SyncState* chullSS= ((AnalysisDataEval*)
+ syncState->analysisData)->graphs->chullSS;
+ const GraphFunctions* graphFunctions=
+ &chullSS->analysisModule->graphFunctions;
+
+ if (graphFunctions->writeTraceTimeBackPlots != NULL)
+ {
+ graphFunctions->writeTraceTimeBackPlots(chullSS, i, j);
+ }
+}
+
+
+/*
+ * Write the analysis-specific graph lines in the gnuplot script.
+ *
+ * Args:
+ * syncState: container for synchronization data
+ * i: first trace number
+ * j: second trace number, garanteed to be larger than i
+ */
+static void writeAnalysisTraceTimeForePlotsEval(SyncState* const syncState,
+ const unsigned int i, const unsigned int j)
+{
+ SyncState* chullSS= ((AnalysisDataEval*)
+ syncState->analysisData)->graphs->chullSS;
+ const GraphFunctions* graphFunctions=
+ &chullSS->analysisModule->graphFunctions;
+
+ if (graphFunctions->writeTraceTimeForePlots != NULL)
+ {
+ graphFunctions->writeTraceTimeForePlots(chullSS, i, j);
+ }
+}