A profiler can accumulate the total amount of data sent by the MPI_SEND function, along with the total elapsed time spent in the function as the following example shows:
Example
static int totalBytes = 0;
static double totalTime = 0.0;
int MPI_Send(const void* buffer, int count, MPI_Datatype datatype,
int dest, int tag, MPI_Comm comm)
{
double tstart = MPI_Wtime(); /* Pass on all arguments */
int size;
int result = PMPI_Send(buffer,count,datatype,dest,tag,comm);
totalTime += MPI_Wtime() - tstart; /* and time */
MPI_Type_size(datatype, &size); /* Compute size */
totalBytes += count*size;
return result;
}