starting from this point implementation is very strange.

In method input you have List which contain relation Name <-> TaskId
then you get latency values by TaskId and get map with relation TaskId <-> RawData
the last task get map with relation Name <-> RawData, IMHO, is implemented in very strange way