Fix memory leak - use tuple.getMessageId() as id for latencies instead of using whole objects.