* @param message Message to add performance headers to.
*/
protected void addPerformanceInfo(Message message)
{
// If MPI is not enabled, simply return.
MessagePerformanceInfo mpiOriginal = MessagePerformanceUtils.getMPII(message);
if (mpiOriginal == null)
return;
// Otherwise, move the MPII object of the queued message to be
// the MPIP object of the outgoing message.
MessagePerformanceInfo mpip = null;
mpip = (MessagePerformanceInfo)mpiOriginal.clone();
try
{
// Set the original message info as the pushed causer info.
MessagePerformanceUtils.setMPIP(message, mpip);
MessagePerformanceUtils.setMPII(message, null);
}
catch (Exception e)
{
if (Log.isDebug())
log.debug("MPI exception while streaming the message: " + e.toString());
}
// Overhead only used when MPI is enabled for sizing
long serializationOverhead = 0;
MessagePerformanceInfo mpio = null;
mpio = new MessagePerformanceInfo();
if (mpip.recordMessageTimes)
{
mpio.sendTime = System.currentTimeMillis();
mpio.infoType = "OUT";
}