public void parse()

in apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/ProcessOtelBenchmarkResults.java [161:193]


        public void parse(String result) throws ParseException {
            if (inResults) {
                if (runAtComment == null) {
                    runAtComment = result.strip();
                } else if (releaseComment == null) {
                    releaseComment = result.strip();
                } else  if (configComment == null) {
                    configComment = result.strip();
                } else if (result.matches("\\s*\\-+\\s*")) {
                    //skip
                } else if (agentNames == null) {
                    String[] agentAndNames = result.split(":");
                    if (agentAndNames[0].trim().equals("Agent")) {
                        agentNames = agentAndNames[1].trim().split("\\s+");
                    } else {
                        throw new ParseException("Expecting 'Agent               :              none           latest ....' but got: "+result);
                    }
                } else if (runDurations == null) {
                    String[] durations = result.split("\\s+:\\s+");
                    if (durations[0].trim().equals("Run duration")) {
                        runDurations = durations[1].trim().split("\\s+");
                    } else {
                        throw new ParseException("Expecting 'Run duration               :              nn:nn:nn           nn:nn:nn ....' but got: "+result);
                    }
                } else if (result.matches("\\s*\\<.*")) {
                    inResults = false;
                } else {
                    results.add(new ResultValues(result, agentNames.length));
                }
            } else if (result.matches("\\s*\\-+\\s*")) {
                inResults = true;
            }
        }