<commit_before>import React from 'react';
import { connect, actions } from 'store/store.js'

import SplitPane from 'components/lib/SplitPane.jsx'

import { ScaleButton } from 'components/Icons.jsx'
import BenchmarkSelection from 'models/BenchmarkSelection.js';
import BenchmarkBundle from 'models/BenchmarkBundle.js';
import DetailSideBar from 'components/DetailSideBar.jsx';
import DetailView from 'components/DetailView.jsx'

import BarChartView from 'components/single/BarChartView.jsx'
import DiffBarChartView from 'components/two/DiffBarChartView.jsx'
import LineChartView from 'components/multi/LineChartView.jsx'

import { parseClassNameFromFullName } from 'functions/parse.js';

/* eslint react/prop-types: 0 */
const DetailScreen = ({ detailedBenchmarkBundle, benchmarkSelection, chartConfig }) => {

    const benchmarkBundles = benchmarkSelection.benchmarkBundles;
    const runNames = benchmarkSelection.runNames;

    const detailBundle = benchmarkBundles.find(bundle => bundle.key === detailedBenchmarkBundle) || new BenchmarkBundle({
        key: detailedBenchmarkBundle,
        name: parseClassNameFromFullName(detailedBenchmarkBundle),
        methodNames: [],
        benchmarkMethods: []
    });
    const secondaryMetrics = Array.from(detailBundle.allBenchmarks().reduce((aggregate, benchmark) => {
        Object.keys(benchmark.secondaryMetrics).forEach(metricKey => aggregate.add(metricKey));
        return aggregate;
    }, new Set()));


    let error, chartGeneratorFunction;
    if (runNames.length == 1) {
        if (detailBundle.methodNames.length == 0) {
            error = `No benchmark results for run  ${runNames[0]}`;
        } else {
            chartGeneratorFunction = singleRunChartGenerator;
        }
    } else if (runNames.length == 2) {
        chartGeneratorFunction = twoRunsChartGenerator;
    } else {
        chartGeneratorFunction = multiRunChartGenerator;
    }

    console.log(chartConfig);

    let mainView;
    if (error) {
        mainView = (<div>{ error }</div>);
    } else {
        mainView = <DetailView
            runNames={ runNames }
            benchmarkBundle={ detailBundle }
            secondaryMetrics={ secondaryMetrics }
            chartConfig={ chartConfig }
            chartGeneratorFunction={ chartGeneratorFunction }
        />
    }
    let buttons = [];
    if (benchmarkSelection.runNames.length == 1 || benchmarkSelection.runNames.length > 2) {
        buttons = [
            <ScaleButton key='scaleButton' active={ chartConfig.logScale } action={ actions.logScale } />
        ];
    }
<commit_msg>Remove debug log<commit_after>import React from 'react';
import { connect, actions } from 'store/store.js'

import SplitPane from 'components/lib/SplitPane.jsx'

import { ScaleButton } from 'components/Icons.jsx'
import BenchmarkSelection from 'models/BenchmarkSelection.js';
import BenchmarkBundle from 'models/BenchmarkBundle.js';
import DetailSideBar from 'components/DetailSideBar.jsx';
import DetailView from 'components/DetailView.jsx'

import BarChartView from 'components/single/BarChartView.jsx'
import DiffBarChartView from 'components/two/DiffBarChartView.jsx'
import LineChartView from 'components/multi/LineChartView.jsx'

import { parseClassNameFromFullName } from 'functions/parse.js';

/* eslint react/prop-types: 0 */
const DetailScreen = ({ detailedBenchmarkBundle, benchmarkSelection, chartConfig }) => {

    const benchmarkBundles = benchmarkSelection.benchmarkBundles;
    const runNames = benchmarkSelection.runNames;

    const detailBundle = benchmarkBundles.find(bundle => bundle.key === detailedBenchmarkBundle) || new BenchmarkBundle({
        key: detailedBenchmarkBundle,
        name: parseClassNameFromFullName(detailedBenchmarkBundle),
        methodNames: [],
        benchmarkMethods: []
    });
    const secondaryMetrics = Array.from(detailBundle.allBenchmarks().reduce((aggregate, benchmark) => {
        Object.keys(benchmark.secondaryMetrics).forEach(metricKey => aggregate.add(metricKey));
        return aggregate;
    }, new Set()));


    let error, chartGeneratorFunction;
    if (runNames.length == 1) {
        if (detailBundle.methodNames.length == 0) {
            error = `No benchmark results for run  ${runNames[0]}`;
        } else {
            chartGeneratorFunction = singleRunChartGenerator;
        }
    } else if (runNames.length == 2) {
        chartGeneratorFunction = twoRunsChartGenerator;
    } else {
        chartGeneratorFunction = multiRunChartGenerator;
    }

    let mainView;
    if (error) {
        mainView = (<div>{ error }</div>);
    } else {
        mainView = <DetailView
            runNames={ runNames }
            benchmarkBundle={ detailBundle }
            secondaryMetrics={ secondaryMetrics }
            chartConfig={ chartConfig }
            chartGeneratorFunction={ chartGeneratorFunction }
        />
    }
    let buttons = [];
    if (benchmarkSelection.runNames.length == 1 || benchmarkSelection.runNames.length > 2) {
        buttons = [
            <ScaleButton key='scaleButton' active={ chartConfig.logScale } action={ actions.logScale } />
        ];
    }

{'fraction_non_alphanumeric': 0.10493587252234746, 'fraction_numerical': 0.0027205596579867857, 'mean_word_length': 3.406678082191781, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4928113', 'n_tokens_mistral': 1423, 'n_tokens_neox': 1369, 'n_words': 301}