class PerformanceToolUtil {

    public static Map<String, String> findPerformanceTestAnnotations(Protos.TaskInfo taskInfo) {
        TitanProtos.ContainerInfo containerInfo;
        try {
            containerInfo = TitanProtos.ContainerInfo.parseFrom(taskInfo.getData());
        } catch (InvalidProtocolBufferException e) {
            return Collections.emptyMap();
        }
        return findTaskLifecycleEnv(containerInfo.getUserProvidedEnvMap())
                .map(PerformanceToolUtil::toAnnotations)
                .orElse(Collections.emptyMap());
    }

}