{"size": 678, "ext": "js", "max_stars_repo_path": "test-result-summary-client/src/utils/perf.js", "max_stars_repo_name": "adam-thorpe/openjdk-test-tools", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "test-result-summary-client/src/utils/perf.js", "max_issues_repo_name": "adam-thorpe/openjdk-test-tools", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test-result-summary-client/src/utils/perf.js", "max_forks_repo_name": "adam-thorpe/openjdk-test-tools", "max_forks_repo_forks_event_min_datetime": "2020-01-14T05:36:46.000Z", "max_forks_repo_forks_event_max_datetime": "2020-01-14T05:36:46.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 32.2857142857, "max_line_length": 116, "alphanum_fraction": 0.6828908555}

export const getParserProps = async () => {
    let parserProps = await fetch( `/api/getParserProps`, {
            method: 'get'
        }
    );
    parserProps = await parserProps.json();
    return parserProps;  
}

export function getMetricProps(parserProps,benchmarkName,benchmarkVariant,curMetric) {
    let metricProps ="";
    let benchmarkMetricRouter = parserProps['benchmarkMetricRouter'];
    let benchmarkMetric = parserProps['benchmarkMetric'];
    try {
        metricProps = benchmarkMetric[benchmarkMetricRouter[benchmarkName][benchmarkVariant]]["metrics"][curMetric];
    } catch (benchmarkInfoErr) {
        metricProps = "";
    }
    return metricProps;
}