moby / buildkit-bench

Set of benchmarks for BuildKit
https://moby.github.io/buildkit-bench/
Apache License 2.0
0 stars 2 forks source link

charts: fix box plot data #75

Closed crazy-max closed 1 week ago

crazy-max commented 1 week ago

Box plot charts are currently corrupted for build breaker benchs:

366982372-a29e1742-c8f8-4058-84a6-fde8e481baa4

<div class="box">
            <div class="container">
                <div class="item" id="oWzEIEqOitnZ" style="width:900px;height:500px;"></div>
            </div>
            <script type="text/javascript">
                "use strict";
                let goecharts_oWzEIEqOitnZ = echarts.init(document.getElementById('oWzEIEqOitnZ'), "white", {
                    renderer: "canvas"
                });
                let option_oWzEIEqOitnZ = goecharts_oWzEIEqOitnZ.setOption(option_oWzEIEqOitnZ);
            </script>
            <div class="container">
                <div class="item" id="GyldjNkXYhQH" style="width:900px;height:500px;"></div>
            </div>
            <script type="text/javascript">
                "use strict";
                let goecharts_GyldjNkXYhQH = echarts.init(document.getElementById('GyldjNkXYhQH'), "white", {
                    renderer: "canvas"
                });
                let option_GyldjNkXYhQH = goecharts_GyldjNkXYhQH.setOption(option_GyldjNkXYhQH);
            </script>
            <div class="container">
                <div class="item" id="CZDWvOaJtVFM" style="width:900px;height:500px;"></div>
            </div>
            <script type="text/javascript">
                "use strict";
                let goecharts_CZDWvOaJtVFM = echarts.init(document.getElementById('CZDWvOaJtVFM'), "white", {
                    renderer: "canvas"
                });
                let option_CZDWvOaJtVFM = goecharts_CZDWvOaJtVFM.setOption(option_CZDWvOaJtVFM);
            </script>
            <div class="container">
                <div class="item" id="LtbITMlGzrtM" style="width:900px;height:500px;"></div>
            </div>
            <script type="text/javascript">
                "use strict";
                let goecharts_LtbITMlGzrtM = echarts.init(document.getElementById('LtbITMlGzrtM'), "white", {
                    renderer: "canvas"
                });
                let option_LtbITMlGzrtM = goecharts_LtbITMlGzrtM.setOption(option_LtbITMlGzrtM);
            </script>
            <div class="container">
                <div class="item" id="NDrQNLIfuTKz" style="width:900px;height:500px;"></div>
            </div>
            <script type="text/javascript">
                "use strict";
                let goecharts_NDrQNLIfuTKz = echarts.init(document.getElementById('NDrQNLIfuTKz'), "white", {
                    renderer: "canvas"
                });
                let option_NDrQNLIfuTKz = {
                    "color": ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"],
                    "dataZoom": [{
                        "type": "slider"
                    }],
                    "legend": {},
                    "series": [{
                        "name": "Time (s)",
                        "type": "boxplot",
                        "data": [{
                            "value": [0.3847, 0.3866, 0.3923, 0.3962, 0.3963]
                        }, {
                            "value": [0.3926, 0.3933, 0.39835, 0.40705, 0.4114]
                        }, {
                            "value": [0.471, 0.4734, 0.47995, 0.48614999999999997, 0.4882]
                        }, {
                            "value": [0.2218, 0.22405, 0.2269, 0.23370000000000002, 0.2399]
                        }, {
                            "value": [0.251, 0.2536, 0.25765, 0.2625, 0.2659]
                        }, {
                            "value": [0.2478, 0.25065, 0.25385, 0.2592, 0.2642]
                        }, {
                            "value": [0.2492, 0.25505, 0.2611, 0.2629, 0.2645]
                        }, {
                            "value": [0.2433, 0.2465, 0.25025000000000003, 0.25195, 0.2531]
                        }, {
                            "value": [0.3133, 0.31745, 0.32175, 0.3224, 0.3229]
                        }, {
                            "value": [0.3148, 0.318, 0.3218, 0.3234, 0.3244]
                        }, {
                            "value": [0.2958, 0.29800000000000004, 0.3006, 0.31165, 0.3223]
                        }, {
                            "value": [0.2882, 0.29195000000000004, 0.2967, 0.2995, 0.3013]
                        }, {
                            "value": [0.2961, 0.29825, 0.302, 0.30479999999999996, 0.306]
                        }, {
                            "value": [0.2889, 0.2942, 0.3016, 0.30725, 0.3108]
                        }, {
                            "value": [0.2992, 0.30185, 0.3052, 0.3087, 0.3115]
                        }, {
                            "value": [0.2903, 0.2962, 0.30335, 0.306, 0.3074]
                        }, {
                            "value": [0.3037, 0.30385, 0.30435, 0.30495000000000005, 0.3052]
                        }, {
                            "value": [0.2916, 0.2938, 0.29769999999999996, 0.3016, 0.3038]
                        }, {
                            "value": [0.3011, 0.3042, 0.30765, 0.31035, 0.3127]
                        }, {
                            "value": [0.2974, 0.29895, 0.3035, 0.31295, 0.3194]
                        }, {
                            "value": [0.2967, 0.2977, 0.30110000000000003, 0.30365, 0.3038]
                        }, {
                            "value": [0.2981, 0.2986, 0.302, 0.30535, 0.3058]
                        }, {
                            "value": [0.3022, 0.3046, 0.311, 0.3163, 0.3176]
                        }, {
                            "value": [0.3071, 0.3095, 0.31235, 0.31375, 0.3147]
                        }, {
                            "value": [0.2932, 0.29764999999999997, 0.3035, 0.31925000000000003, 0.3336]
                        }, {
                            "value": [0.3047, 0.30569999999999997, 0.308, 0.3104, 0.3115]
                        }]
                    }],
                    "title": {
                        "text": "Local build",
                        "subtext": "BenchmarkBuild/BenchmarkBuildLocal"
                    },
                    "toolbox": {},
                    "tooltip": {},
                    "xAxis": [{
                        "data": ["v0.9.0", "v0.9.3", "v0.10.0", "v0.10.6", "v0.11.0", "v0.11.6", "v0.12.0", "v0.12.5", "v0.13.0", "v0.13.2", "v0.14.0", "v0.14.1", "v0.15.0", "v0.15.2", "2024-08-28", "2024-08-30", "2024-09-02", "2024-09-03", "2024-09-04", "2024-09-05", "2024-09-06", "2024-09-09", "2024-09-10", "v0.16.0", "2024-09-11", "master"]
                    }],
                    "yAxis": [{
                        "min": 0.2
                    }]
                }

                goecharts_NDrQNLIfuTKz.setOption(option_NDrQNLIfuTKz);
            </script>

This is because we don't have enough runs to generate plot data: [33.89 NaN 33.89 NaN 33.89].

With this change I'm just checking for NaN values and replace with previous or next valid one. As follow-up we should detect if there is no enough data and fall back to another type of chart.