diff --git a/dubbo-benchmark-proposals/README.md b/dubbo-benchmark-proposals/README.md new file mode 100644 index 00000000000..d2f113c08f6 --- /dev/null +++ b/dubbo-benchmark-proposals/README.md @@ -0,0 +1,70 @@ +# 自动化的 Dubbo 框架与协议性能基准 Benchmark 机制与平台使用手册 + +## 环境要求 +* JDK 1.8 (执行benchmark程序) +* Maven (构建代码) +* ncat (用于探测端口是否开放) +* jq (用于处理benchmark结果) +* mycli (用于操作数据库) +* MySQL 8(存储benchmark结果) +* Grafana(展示benchmark结果) +* Kubernetes (用于部署) + +## 目录说明 +* asserts 截图资源 +* docker 存放执行benchmark时所需的基础镜像构建Dockerfile +* grafana 存放benchmark的grafana dashboard +* kubernetes 存放kubernetes相关的yaml + +## 使用方式 +### 1. 先进入存放yaml的kubernetes目录,然后执行以下命令 +````shell +kubectl apply -f pvc.yaml +kubectl apply -f infra.yaml +kubectl apply -f benchmark-shell.yaml +kubectl apply -f benchmark-cron.yaml +```` +### 2. 初始化mysql benchmark数据库 +通过以下命令找到mysql pod +````shell +kubectl get pod +```` +通过以下命令进入mysql容器 +````shell +kubectl exec -it [mysql pod] -- /bin/bash +```` +进入mysql容器后通过以下命令连接mysql, 默认密码root +````shell +mysql -u root -p +```` +导入schema.sql文件 +````shell +use benchmark; +source /home/dev/schema.sql; +```` + + +### 3. 访问Grafana +可通过以下命令获取Grafana的地址 +````shell +kubectl get svc grafana +```` + +### 4. 导入benchmark dashboard +![usage-1](./assets/usage-1.png) +然后在浏览器中输入地址,用户名密码为admin/admin (默认的账号密码) + +登入Grafana后按照以下步骤导入`grafana/benchmark-dashboard.json`面板 +![usage-2](./assets/usage-2.png) +![usage-3](./assets/usage-3.png) + +### 5. 等待kubernetes调度benchmark任务 +经过一段时间的benchmark后,便可以看到以下结果 +![image-1](./assets/image-1.png) + + + + + + + diff --git a/dubbo-benchmark-proposals/assets/image-1.png b/dubbo-benchmark-proposals/assets/image-1.png new file mode 100644 index 00000000000..1668faddb97 Binary files /dev/null and b/dubbo-benchmark-proposals/assets/image-1.png differ diff --git a/dubbo-benchmark-proposals/assets/image-2.png b/dubbo-benchmark-proposals/assets/image-2.png new file mode 100644 index 00000000000..3ecda9af11e Binary files /dev/null and b/dubbo-benchmark-proposals/assets/image-2.png differ diff --git a/dubbo-benchmark-proposals/assets/usage-1.png b/dubbo-benchmark-proposals/assets/usage-1.png new file mode 100644 index 00000000000..b60643a291d Binary files /dev/null and b/dubbo-benchmark-proposals/assets/usage-1.png differ diff --git a/dubbo-benchmark-proposals/assets/usage-2.png b/dubbo-benchmark-proposals/assets/usage-2.png new file mode 100644 index 00000000000..0eef3d88c92 Binary files /dev/null and b/dubbo-benchmark-proposals/assets/usage-2.png differ diff --git a/dubbo-benchmark-proposals/assets/usage-3.png b/dubbo-benchmark-proposals/assets/usage-3.png new file mode 100644 index 00000000000..7cbcf7d9281 Binary files /dev/null and b/dubbo-benchmark-proposals/assets/usage-3.png differ diff --git a/dubbo-benchmark-proposals/docker/Dockerfile b/dubbo-benchmark-proposals/docker/Dockerfile new file mode 100644 index 00000000000..4d3421ca3d3 --- /dev/null +++ b/dubbo-benchmark-proposals/docker/Dockerfile @@ -0,0 +1,17 @@ +FROM maven:3.6.3-adoptopenjdk-8 +RUN sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list +RUN useradd -ms /bin/bash dev +RUN usermod -aG sudo dev +RUN apt-get update && apt-get install -y \ + vim \ + ncat \ + jq \ + mycli + +ENV HOME /home/dev +ENV MAVEN_CONFIG /home/dev/.m2 +ENV USER_HOME_DIR /home/dev +USER dev +WORKDIR /home/dev +COPY ./settings.xml /usr/share/maven/conf/settings.xml +ENV PATH $JAVA_HOME/bin:$PATH \ No newline at end of file diff --git a/dubbo-benchmark-proposals/grafana/benchmark-dashboard.json b/dubbo-benchmark-proposals/grafana/benchmark-dashboard.json new file mode 100644 index 00000000000..1c48340acd6 --- /dev/null +++ b/dubbo-benchmark-proposals/grafana/benchmark-dashboard.json @@ -0,0 +1,3474 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 2, + "links": [], + "panels": [ + { + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "description": "1", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "op" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 3, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true, + "width": 0 + }, + "timezone": [ + "" + ], + "tooltip": { + "maxWidth": 0, + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'dubbo' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND name = 'dubbo-fastjson2-3.2' AND mode = 'thrpt') order by benchmark_time asc LIMIT 1000", + "refId": "dubbo-fastjson2", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'grpc' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientNativeGrpc.createUser' AND name = 'grpc' AND mode = 'thrpt') order by benchmark_time asc LIMIT 1000", + "refId": "grpc", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'spring-cloud' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND name = 'spring-cloud' AND mode = 'thrpt') order by benchmark_time asc LIMIT 1000", + "refId": "spring-cloud", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "benchmark_score" + } + ], + "title": "Throughput (常见框架对比)", + "type": "timeseries" + }, + { + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "description": "1", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "op" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 9 + }, + "id": 5, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true, + "width": 0 + }, + "timezone": [ + "" + ], + "tooltip": { + "maxWidth": 0, + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'triple' FROM benchmark.benchmark_score WHERE ( benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND name = 'triple-3.2' AND mode = 'thrpt') order by benchmark_time asc LIMIT 1000", + "refId": "triple-pb", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'dubbo-fastjson2' FROM benchmark.benchmark_score WHERE ( benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND name = 'dubbo-fastjson2-3.2' AND mode = 'thrpt') order by benchmark_time asc LIMIT 1000", + "refId": "dubbo", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'grpc' FROM benchmark.benchmark_score WHERE ( benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientNativeGrpc.createUser' AND name = 'grpc' AND mode = 'thrpt') order by benchmark_time asc LIMIT 1000", + "refId": "grpc", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'rest(spring-cloud)' FROM benchmark.benchmark_score WHERE ( benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND name = 'spring-cloud' AND mode = 'thrpt') order by benchmark_time asc LIMIT 1000", + "refId": "spring-cloud", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "benchmark_score" + } + ], + "title": "Throughput (各协议对比)", + "type": "timeseries" + }, + { + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "description": "1", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "op" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 9 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true, + "width": 0 + }, + "timezone": [ + "" + ], + "tooltip": { + "maxWidth": 0, + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'dubbo-fastjson2' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND name = 'dubbo-fastjson2-3.2' AND mode = 'thrpt') order by benchmark_time asc LIMIT 1000", + "refId": "dubbo-fastjson2", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'dubbo-hessianlite' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND name = 'dubbo-hessianlite-3.2' AND mode = 'thrpt') order by benchmark_time asc LIMIT 1000", + "refId": "hessianlite", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'triple-pb' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND name = 'triple-3.2' AND mode = 'thrpt') order by benchmark_time asc LIMIT 1000", + "refId": "triple-3.2", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'dubbo-pb' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND name = 'dubbo-pb-3.2' AND mode = 'thrpt') order by benchmark_time asc LIMIT 1000", + "refId": "dubbo-pb", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'dubbo-kryo' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND name = 'dubbo-kryo-3.2' AND mode = 'thrpt') order by benchmark_time asc LIMIT 1000", + "refId": "dubbo-kryo", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "benchmark_score" + } + ], + "title": "Throughput (序列化对比)", + "type": "timeseries" + }, + { + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'dubbo' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND name = 'dubbo-fastjson2-3.2' AND mode = 'avgt') order by benchmark_time asc LIMIT 1000", + "refId": "dubbo", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'grpc' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientNativeGrpc.createUser' AND name = 'grpc' AND mode = 'avgt') order by benchmark_time asc LIMIT 1000", + "refId": "grpc", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'spring-cloud' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND name = 'spring-cloud' AND mode = 'avgt') order by benchmark_time asc LIMIT 1000", + "refId": "spring-cloud", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + } + ], + "title": "AverageTime (常见框架对比)", + "type": "timeseries" + }, + { + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "description": "1", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 29 + }, + "id": 7, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true, + "width": 0 + }, + "timezone": [ + "" + ], + "tooltip": { + "maxWidth": 0, + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'triple' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND name = 'triple-3.2' AND method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'avgt') order by benchmark_time asc LIMIT 1000", + "refId": "triple-pb", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'dubbo' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND name = 'dubbo-fastjson2-3.2' AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND mode = 'avgt') order by benchmark_time asc LIMIT 1000", + "refId": "dubbo", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'grpc' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND name = 'grpc' AND method = 'org.apache.dubbo.benchmark.ClientNativeGrpc.createUser' AND mode = 'avgt') order by benchmark_time asc LIMIT 1000", + "refId": "grpc", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'rest(spring-cloud)' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND name = 'spring-cloud' AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND mode = 'avgt') order by benchmark_time asc LIMIT 1000", + "refId": "spring-cloud", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "benchmark_score" + } + ], + "title": "AverageTime (各协议对比)", + "type": "timeseries" + }, + { + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 29 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'triple-pb' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND name = 'triple-3.2' AND mode = 'avgt') order by benchmark_time asc LIMIT 1000", + "refId": "triple-pb", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'dubbo-fastjson2' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND name = 'dubbo-fastjson2-3.2' AND mode = 'avgt') order by benchmark_time asc LIMIT 1000", + "refId": "dubbo-fastjson2", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'dubbo-hessianlite' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND name = 'dubbo-hessianlite-3.2' AND mode = 'avgt') order by benchmark_time asc LIMIT 1000", + "refId": "dubbo-hessianlite", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'dubbo-pb' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND name = 'dubbo-pb-3.2' AND mode = 'avgt') order by benchmark_time asc LIMIT 1000", + "refId": "dubbo-pb", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), score AS 'dubbo-kryo' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND name = 'dubbo-kryo-3.2' AND mode = 'avgt') order by benchmark_time asc LIMIT 1000", + "refId": "dubbo-kryo", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + } + ], + "title": "AverageTime (序列化对比)", + "type": "timeseries" + }, + { + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 6, + "x": 0, + "y": 39 + }, + "id": 10, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.4.0", + "targets": [ + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), p99 AS 'p99' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND name = 'dubbo-fastjson2-3.2' AND mode = 'sample') order by benchmark_time asc LIMIT 1000", + "refId": "p99", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), p95 AS 'p95' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND name = 'dubbo-fastjson2-3.2' AND mode = 'sample') order by benchmark_time asc LIMIT 1000", + "refId": "p95", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), p90 AS 'p90' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND name = 'dubbo-fastjson2-3.2' AND mode = 'sample') order by benchmark_time asc LIMIT 1000", + "refId": "p90", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + } + ], + "title": "Dubbo Request Duration", + "type": "timeseries" + }, + { + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 6, + "x": 6, + "y": 39 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.4.0", + "targets": [ + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), p99 AS 'p99' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND name = 'triple-3.2' AND mode = 'sample') order by benchmark_time asc LIMIT 1000", + "refId": "p99", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), p95 AS 'p95' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND name = 'triple-3.2' AND mode = 'sample') order by benchmark_time asc LIMIT 1000", + "refId": "p95", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), p90 AS 'p90' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND name = 'triple-3.2' AND mode = 'sample') order by benchmark_time asc LIMIT 1000", + "refId": "p90", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + } + ], + "title": "Triple Request Duration", + "type": "timeseries" + }, + { + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 6, + "x": 12, + "y": 39 + }, + "id": 11, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.4.0", + "targets": [ + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), p99 AS 'p99' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientNativeGrpc.createUser' AND name = 'grpc' AND mode = 'sample') order by benchmark_time asc LIMIT 1000", + "refId": "p99", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), p95 AS 'p95' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientNativeGrpc.createUser' AND name = 'grpc' AND mode = 'sample') order by benchmark_time asc LIMIT 1000", + "refId": "p95", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), p90 AS 'p90' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientNativeGrpc.createUser' AND name = 'grpc' AND mode = 'sample') order by benchmark_time asc LIMIT 1000", + "refId": "p90", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + } + ], + "title": "gRPC Request Duration", + "type": "timeseries" + }, + { + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 6, + "x": 18, + "y": 39 + }, + "id": 9, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.4.0", + "targets": [ + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), p99 AS 'p99' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND name = 'spring-cloud' AND mode = 'sample') order by benchmark_time asc LIMIT 1000", + "refId": "p99", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), p95 AS 'p95' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND name = 'spring-cloud' AND mode = 'sample') order by benchmark_time asc LIMIT 1000", + "refId": "p95", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + }, + { + "dataset": "benchmark", + "datasource": { + "type": "mysql", + "uid": "cdgufsoabpm9sf" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT CONVERT_TZ(benchmark_time, '+08:00', '+00:00'), p90 AS 'p90' FROM benchmark.benchmark_score WHERE (benchmark_time >= $__timeFrom() AND benchmark_time <= $__timeTo() AND method = 'org.apache.dubbo.benchmark.ClientSimple.createUser' AND name = 'spring-cloud' AND mode = 'sample') order by benchmark_time asc LIMIT 1000", + "refId": "p90", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "benchmark_time", + "type": "functionParameter" + } + ], + "type": "function" + }, + { + "parameters": [ + { + "name": "score", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50, + "whereJsonTree": { + "children1": [ + { + "id": "8b88abb9-4567-489a-bcde-f18e2e42406d", + "properties": { + "field": "method", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "org.apache.dubbo.benchmark.ClientPb.createUser" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + }, + { + "id": "bbab8a89-4567-489a-bcde-f18e2e4c364e", + "properties": { + "field": "mode", + "fieldSrc": "field", + "operator": "equal", + "value": [ + "thrpt" + ], + "valueSrc": [ + "value" + ], + "valueType": [ + "text" + ] + }, + "type": "rule" + } + ], + "id": "babaab8b-0123-4456-b89a-b18e2e2b3f6e", + "type": "group" + }, + "whereString": "(method = 'org.apache.dubbo.benchmark.ClientPb.createUser' AND mode = 'thrpt')" + }, + "table": "benchmark_score" + } + ], + "title": "SpringCloud Request Duration", + "type": "timeseries" + } + ], + "refresh": "", + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-7d", + "to": "now" + }, + "timepicker": { + "hidden": false, + "nowDelay": "" + }, + "timezone": "browser", + "title": "benchmark", + "uid": "adfd3abtniznke", + "version": 7, + "weekStart": "" +} \ No newline at end of file diff --git a/dubbo-benchmark-proposals/kubernetes/benchmark-cron.yaml b/dubbo-benchmark-proposals/kubernetes/benchmark-cron.yaml new file mode 100644 index 00000000000..26590eb86f6 --- /dev/null +++ b/dubbo-benchmark-proposals/kubernetes/benchmark-cron.yaml @@ -0,0 +1,478 @@ +apiVersion: batch/v1 +kind: CronJob +metadata: + name: cron-dubbo-fastjson2-32-benchmark-job +spec: + schedule: "20 * * * *" + jobTemplate: + spec: + ttlSecondsAfterFinished: 300 + template: + spec: + terminationGracePeriodSeconds: 300 + containers: + - name: dubbo-benchmark + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + image: registry.cn-shenzhen.aliyuncs.com/beinglang/dev-base:v1.0 + command: [ "/bin/bash", "/home/dev/script/start.sh" ] + env: + - name: BENCHMARK_NAME + value: "dubbo-fastjson2-3.2" + - name: BRANCH + value: "3.2" + - name: SERVER_MODULE_NAME + value: "dubbo-fastjson2-server" + - name: CLIENT_MODULE_NAME + value: "dubbo-fastjson2-client" + - name: SERVER_PROFILING_NAME + value: "dubbo-fastjson2-server-3.2" + - name: CLIENT_PROFILING_NAME + value: "dubbo-fastjson2-client-3.2" + - name: SHELL_HOME + value: /home/dev/script + - name: MYSQL_SECRET + value: /home/dev/.mysql/config + volumeMounts: + - name: script-volume + mountPath: /home/dev/script + - name: empty-dir + mountPath: /home/dev/.m2/repository + - name: git-ssh + mountPath: /home/dev/.ssh + - name: mysql-secret + mountPath: /home/dev/.mysql + resources: + requests: + cpu: "4" + memory: "3072Mi" + limits: + cpu: "4" + memory: "3072Mi" + volumes: + - name: script-volume + configMap: + name: benchmark-shell-configmap + - name: git-ssh + secret: + secretName: git-ssh + - name: empty-dir + emptyDir: { } + - name: mysql-secret + secret: + secretName: mysql-secret + restartPolicy: Never + + +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + name: cron-dubbo-hessianlite-32-benchmark-job +spec: + schedule: "20 * * * *" + jobTemplate: + spec: + ttlSecondsAfterFinished: 300 + template: + spec: + terminationGracePeriodSeconds: 300 + containers: + - name: dubbo-benchmark + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + image: registry.cn-shenzhen.aliyuncs.com/beinglang/dev-base:v1.0 + command: [ "/bin/bash", "/home/dev/script/start.sh" ] + env: + - name: BENCHMARK_NAME + value: "dubbo-hessianlite-3.2" + - name: BRANCH + value: "3.2" + - name: SERVER_MODULE_NAME + value: "dubbo-hessianlite-server" + - name: CLIENT_MODULE_NAME + value: "dubbo-hessianlite-client" + - name: SERVER_PROFILING_NAME + value: "dubbo-hessianlite-server-3.2" + - name: CLIENT_PROFILING_NAME + value: "dubbo-hessianlite-client-3.2" + - name: SHELL_HOME + value: /home/dev/script + - name: MYSQL_SECRET + value: /home/dev/.mysql/config + volumeMounts: + - name: script-volume + mountPath: /home/dev/script + - name: empty-dir + mountPath: /home/dev/.m2/repository + - name: git-ssh + mountPath: /home/dev/.ssh + - name: mysql-secret + mountPath: /home/dev/.mysql + resources: + requests: + cpu: "4" + memory: "3072Mi" + limits: + cpu: "4" + memory: "3072Mi" + volumes: + - name: script-volume + configMap: + name: benchmark-shell-configmap + - name: git-ssh + secret: + secretName: git-ssh + - name: empty-dir + emptyDir: { } + - name: mysql-secret + secret: + secretName: mysql-secret + restartPolicy: Never + + +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + name: cron-grpc-benchmark-job +spec: + schedule: "20 * * * *" + jobTemplate: + spec: + ttlSecondsAfterFinished: 300 + template: + spec: + terminationGracePeriodSeconds: 300 + containers: + - name: dubbo-benchmark + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + image: registry.cn-shenzhen.aliyuncs.com/beinglang/dev-base:v1.0 + command: [ "/bin/bash", "/home/dev/script/start.sh" ] + env: + - name: BENCHMARK_NAME + value: "grpc" + - name: BRANCH + value: "3.2" + - name: SERVER_MODULE_NAME + value: "native-grpc-server" + - name: CLIENT_MODULE_NAME + value: "native-grpc-client" + - name: SERVER_PROFILING_NAME + value: "grpc-server" + - name: CLIENT_PROFILING_NAME + value: "grpc-client" + - name: SHELL_HOME + value: /home/dev/script + - name: MYSQL_SECRET + value: /home/dev/.mysql/config + volumeMounts: + - name: script-volume + mountPath: /home/dev/script + - name: empty-dir + mountPath: /home/dev/.m2/repository + - name: git-ssh + mountPath: /home/dev/.ssh + - name: mysql-secret + mountPath: /home/dev/.mysql + resources: + requests: + cpu: "4" + memory: "3072Mi" + limits: + cpu: "4" + memory: "3072Mi" + volumes: + - name: script-volume + configMap: + name: benchmark-shell-configmap + - name: git-ssh + secret: + secretName: git-ssh + - name: empty-dir + emptyDir: { } + - name: mysql-secret + secret: + secretName: mysql-secret + restartPolicy: Never + +--- + + +apiVersion: batch/v1 +kind: CronJob +metadata: + name: cron-spring-cloud-benchmark-job +spec: + schedule: "40 * * * *" + jobTemplate: + spec: + ttlSecondsAfterFinished: 300 + template: + spec: + terminationGracePeriodSeconds: 300 + containers: + - name: dubbo-benchmark + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + image: registry.cn-shenzhen.aliyuncs.com/beinglang/dev-base:v1.0 + command: [ "/bin/bash", "/home/dev/script/start.sh" ] + env: + - name: BENCHMARK_NAME + value: "spring-cloud" + - name: BRANCH + value: "3.2" + - name: SERVER_MODULE_NAME + value: "springcloud-server" + - name: CLIENT_MODULE_NAME + value: "springcloud-client" + - name: SERVER_PROFILING_NAME + value: "spring-cloud-server" + - name: CLIENT_PROFILING_NAME + value: "spring-cloud-client" + - name: SHELL_HOME + value: /home/dev/script + - name: MYSQL_SECRET + value: /home/dev/.mysql/config + volumeMounts: + - name: script-volume + mountPath: /home/dev/script + - name: empty-dir + mountPath: /home/dev/.m2/repository + - name: git-ssh + mountPath: /home/dev/.ssh + - name: mysql-secret + mountPath: /home/dev/.mysql + resources: + requests: + cpu: "4" + memory: "3072Mi" + limits: + cpu: "4" + memory: "3072Mi" + volumes: + - name: script-volume + configMap: + name: benchmark-shell-configmap + - name: git-ssh + secret: + secretName: git-ssh + - name: empty-dir + emptyDir: { } + - name: mysql-secret + secret: + secretName: mysql-secret + restartPolicy: Never + + +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + name: cron-triple-32-benchmark-job +spec: + schedule: "40 * * * *" + jobTemplate: + spec: + ttlSecondsAfterFinished: 300 + template: + spec: + terminationGracePeriodSeconds: 300 + containers: + - name: dubbo-benchmark + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + image: registry.cn-shenzhen.aliyuncs.com/beinglang/dev-base:v1.0 + command: [ "/bin/bash", "/home/dev/script/start.sh" ] + env: + - name: BENCHMARK_NAME + value: "triple-3.2" + - name: BRANCH + value: "3.2" + - name: SERVER_MODULE_NAME + value: "dubbo-triple-server" + - name: CLIENT_MODULE_NAME + value: "dubbo-triple-client" + - name: SERVER_PROFILING_NAME + value: "dubbo-triple-server-3.2" + - name: CLIENT_PROFILING_NAME + value: "dubbo-triple-client-3.2" + - name: SHELL_HOME + value: /home/dev/script + - name: MYSQL_SECRET + value: /home/dev/.mysql/config + volumeMounts: + - name: script-volume + mountPath: /home/dev/script + - name: empty-dir + mountPath: /home/dev/.m2/repository + - name: git-ssh + mountPath: /home/dev/.ssh + - name: mysql-secret + mountPath: /home/dev/.mysql + resources: + requests: + cpu: "4" + memory: "3072Mi" + limits: + cpu: "4" + memory: "3072Mi" + volumes: + - name: script-volume + configMap: + name: benchmark-shell-configmap + - name: git-ssh + secret: + secretName: git-ssh + - name: empty-dir + emptyDir: { } + - name: mysql-secret + secret: + secretName: mysql-secret + restartPolicy: Never + + +--- + +apiVersion: batch/v1 +kind: CronJob +metadata: + name: cron-dubbo-kryo-32-benchmark-job +spec: + schedule: "40 * * * *" + jobTemplate: + spec: + ttlSecondsAfterFinished: 300 + template: + spec: + terminationGracePeriodSeconds: 300 + containers: + - name: dubbo-benchmark + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + image: registry.cn-shenzhen.aliyuncs.com/beinglang/dev-base:v1.0 + command: [ "/bin/bash", "/home/dev/script/start.sh" ] + env: + - name: BENCHMARK_NAME + value: "dubbo-kryo-3.2" + - name: BRANCH + value: "3.2" + - name: SERVER_MODULE_NAME + value: "dubbo-kryo-server" + - name: CLIENT_MODULE_NAME + value: "dubbo-kryo-client" + - name: SERVER_PROFILING_NAME + value: "dubbo-kryo-server-3.2" + - name: CLIENT_PROFILING_NAME + value: "dubbo-kryo-client-3.2" + - name: SHELL_HOME + value: /home/dev/script + - name: MYSQL_SECRET + value: /home/dev/.mysql/config + volumeMounts: + - name: script-volume + mountPath: /home/dev/script + - name: empty-dir + mountPath: /home/dev/.m2/repository + - name: git-ssh + mountPath: /home/dev/.ssh + - name: mysql-secret + mountPath: /home/dev/.mysql + resources: + requests: + cpu: "4" + memory: "3072Mi" + limits: + cpu: "4" + memory: "3072Mi" + volumes: + - name: script-volume + configMap: + name: benchmark-shell-configmap + - name: git-ssh + secret: + secretName: git-ssh + - name: empty-dir + emptyDir: { } + - name: mysql-secret + secret: + secretName: mysql-secret + restartPolicy: Never + +--- + + +apiVersion: batch/v1 +kind: CronJob +metadata: + name: cron-dubbo-pb-32-benchmark-job +spec: + schedule: "0 * * * *" + jobTemplate: + spec: + ttlSecondsAfterFinished: 300 + template: + spec: + terminationGracePeriodSeconds: 300 + containers: + - name: dubbo-benchmark + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + image: registry.cn-shenzhen.aliyuncs.com/beinglang/dev-base:v1.0 + command: [ "/bin/bash", "/home/dev/script/start.sh" ] + env: + - name: BENCHMARK_NAME + value: "dubbo-pb-3.2" + - name: BRANCH + value: "3.2" + - name: SERVER_MODULE_NAME + value: "dubbo-pb-server" + - name: CLIENT_MODULE_NAME + value: "dubbo-pb-client" + - name: SERVER_PROFILING_NAME + value: "dubbo-pb-server-3.2" + - name: CLIENT_PROFILING_NAME + value: "dubbo-pb-client-3.2" + - name: SHELL_HOME + value: /home/dev/script + - name: MYSQL_SECRET + value: /home/dev/.mysql/config + volumeMounts: + - name: script-volume + mountPath: /home/dev/script + - name: empty-dir + mountPath: /home/dev/.m2/repository + - name: git-ssh + mountPath: /home/dev/.ssh + - name: mysql-secret + mountPath: /home/dev/.mysql + resources: + requests: + cpu: "4" + memory: "3072Mi" + limits: + cpu: "4" + memory: "3072Mi" + volumes: + - name: script-volume + configMap: + name: benchmark-shell-configmap + - name: git-ssh + secret: + secretName: git-ssh + - name: empty-dir + emptyDir: { } + - name: mysql-secret + secret: + secretName: mysql-secret + restartPolicy: Never + +--- diff --git a/dubbo-benchmark-proposals/kubernetes/benchmark-shell.yaml b/dubbo-benchmark-proposals/kubernetes/benchmark-shell.yaml new file mode 100644 index 00000000000..1f409c93abc --- /dev/null +++ b/dubbo-benchmark-proposals/kubernetes/benchmark-shell.yaml @@ -0,0 +1,90 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: benchmark-shell-configmap +data: + start.sh: | + #!/bin/bash + if [ -e "$MYSQL_SECRET" ]; then + source $MYSQL_SECRET + fi + echo "SHELL_HOME=$SHELL_HOME" + echo "benchmark-name=$BENCHMARK_NAME" + echo "branch=$BRANCH" + cd ~ || exit + echo $(pwd) + echo "pull dubbo source code." + git clone --depth 1 --single-branch --branch $BRANCH git@github.com:apache/dubbo.git || exit + REVISION=`awk '/[^<]+<\/revision>/{gsub(/|<\/revision>/,"",$1);print $1;exit;}' ./dubbo/pom.xml` + VERSION=$REVISION + echo "version=$REVISION" + mvn -T "$(nproc)" clean install -f ./dubbo/pom.xml -Dmaven.test.skip=true || exit + + bash $SHELL_HOME/benchmark.sh $BENCHMARK_NAME $VERSION + + benchmark.sh: | + BENCHMARK_NAME=$1 + VERSION=$2 + MINOR_VERSION=$(echo $VERSION | awk -F '.' '{print $1"."$2}') + echo "minor-version=$MINOR_VERSION" + cd ~ || exit + git clone --depth 1 --single-branch --branch master git@github.com:apache/dubbo-benchmark.git || exit + cd ~/dubbo-benchmark || exit + bash prepare.sh $VERSION + bash benchmark.sh -m profiling ${SERVER_MODULE_NAME} & + # wait for server to start + cleanup() { + echo "Received termination signal. Exiting..." + exit 0 + } + trap cleanup SIGTERM SIGINT + attempt=0 + while ! nc -z localhost 8080; do + echo "Waiting for port 8080 to open..." + attempt=$((attempt+1)) + if [[ ${attempt} -eq 60 ]]; then + echo "Port 8080 not open after 10 minutes. Exiting." + exit 1 + fi + sleep 10 + done + bash benchmark.sh -m profiling ${CLIENT_MODULE_NAME} + server_pid=$(jps | grep "${SERVER_MODULE_NAME}" | awk '{print $1}') + kill -SIGTERM $server_pid + while ps -p "$server_pid" > /dev/null; do + echo "Waiting for server to stop..." + sleep 5 + done + bash $SHELL_HOME/push_mysql.sh ${BENCHMARK_NAME} + + push_mysql.sh: | + #!/bin/bash + source $MYSQL_SECRET + NAME=$1 + parse_jmh_results() { + cat *.json | jq -c '.[]' | while IFS= read -r obj; do + method=$(echo "$obj" | jq -r '.benchmark') + mode=$(echo "$obj" | jq -r '.mode') + score=$(echo "$obj" | jq -r '.primaryMetric.score') + p99=$(echo "$obj" | jq -r '.primaryMetric.scorePercentiles."99.9999"') + p95=$(echo "$obj" | jq -r '.primaryMetric.scorePercentiles."95.0"') + p90=$(echo "$obj" | jq -r '.primaryMetric.scorePercentiles."90.0"') + sql="INSERT INTO benchmark_score (name, method, mode, score, p99, p95, p90, benchmark_time, create_time) VALUES ('$NAME', '$method', '$mode', $score, $p99, $p95, $p90, now(), now());" + echo "$sql" >> ./inserts.sql + done + cat ./inserts.sql + echo "push data to mysql." + mycli -h "${MYSQL_HOST}" -u "${MYSQL_USER}" -p "${MYSQL_PASSWORD}" -D "${MYSQL_DATABASE}" -e "source ./inserts.sql" + } + parse_jmh_results +--- +apiVersion: v1 +kind: Secret +metadata: + name: git-ssh +type: Opaque +data: + id_ed25519: private_key_base64 + id_ed25519.pub: public_key_base64 + known_hosts: Z2l0aHViLmNvbSBzc2gtZWQyNTUxOSBBQUFBQzNOemFDMWxaREkxTlRFNUFBQUFJT01xcW5rVnpybTBTZEc2VU9vcUtMc2FiZ0g1Qzlva1dpMGRoMmw5R0tKbApnaXRodWIuY29tIGVjZHNhLXNoYTItbmlzdHAyNTYgQUFBQUUyVmpaSE5oTFhOb1lUSXRibWx6ZEhBeU5UWUFBQUFJYm1semRIQXlOVFlBQUFCQkJFbUtTRU5qUUVlek9teGtaTXk3b3BLZ3dGQjlua3Q1WVJyWU1qTnVHNU44N3VSZ2c2Q0xyYm81d0FkVC95NnYwbUtWMFUydzBXWjJZQi8rK1Rwb2NrZz0KZ2l0aHViLmNvbSBzc2gtcnNhIEFBQUFCM056YUMxeWMyRUFBQUFEQVFBQkFBQUJnUUNqN25kTnhRb3dnY1FuanNoY0xycVBFaWlwaG50K1ZUVHZEUDZtSEJMOWoxYU5Va1k0VWUxZ3Z3bkdMVmxPaEdlWXJuWmFNZ1JLNitQS0NVWGFEYkM3cXRiVzhnSWtoTDdhR0NzT3IvQzU2U0pNeS9CQ1pmeGQxbld6QU94U0RQZ1ZzbWVyT0JZZk5xbHRWOS9oV0NxQnl3SU5JUis1ZElnNkpUSjcycGNFcEVqY1lnWGtFMllFRlhWMUpIbnNLZ2JMV05saFNjcWIyVW15UmtReXl0Ukx0TCszOFRHeGt4Q2ZsbU8rNVo4Q1NTTlk3R2lkak1JWjdRNHpNakEybjFuR3JsVERrendEQ3N3K3dxRlBHUUExNzljbmZHV09XUlZydWoxNno2WHl2eHZqSndiejB3UVo3NVhLNXRLU2I3Rk55ZUlFczRUVDRqaytTNGRoUGVBVUM1eStiRFlpcllnTTRHQzd1RW56dG5aeWFWV1E3QjM4MUFLNFFkcnd0NTFacUV4S2JRcFRVTm4rRWpxb1R3dnFOajRrcXg1UVVDSTBUaFMvWWtPeEpDWG1QVVdaYmhqcENnNTZpKzJhQjZDbUsySkdobjU3SzVtajBNTmRCWEE0L1dud0g2WG9QV0p6SzVOeXUyekIzbkFacCtTNWhwUXMrcDF2TjEvd3Nqaz0= + diff --git a/dubbo-benchmark-proposals/kubernetes/infra.yaml b/dubbo-benchmark-proposals/kubernetes/infra.yaml new file mode 100644 index 00000000000..f92581178f9 --- /dev/null +++ b/dubbo-benchmark-proposals/kubernetes/infra.yaml @@ -0,0 +1,153 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: mysql-schema-configmap +data: + schema.sql: | + use benchmark; + create table benchmark_score + ( + id bigint auto_increment primary key, + name varchar(32) not null, + mode varchar(16) not null, + score double not null, + p99 double not null, + p95 double not null, + p90 double not null, + method varchar(64) not null, + benchmark_time datetime not null, + create_time datetime not null + ); + create index idx on benchmark_score (benchmark_time, method, name, mode); +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mysql-deployment +spec: + selector: + matchLabels: + app: mysql + template: + metadata: + labels: + app: mysql + spec: + containers: + - name: mysql + image: mysql:8.0.36 + env: + - name: TZ + value: "Asia/Shanghai" + - name: MYSQL_ROOT_PASSWORD + value: "root" + - name: MYSQL_DATABASE + value: "benchmark" + resources: + requests: + memory: "1024Mi" + limits: + memory: "1024Mi" + ports: + - containerPort: 3306 + volumeMounts: + - name: benchmark-pvc + mountPath: /var/lib/mysql + subPath: mysql + - name: init-script + mountPath: /home/dev/schema.sql + subPath: schema.sql + + volumes: + - name: init-script + configMap: + name: mysql-schema-configmap + - name: benchmark-pvc + persistentVolumeClaim: + claimName: benchmark +--- +apiVersion: v1 +kind: Service +metadata: + name: mysql-service +spec: + type: ClusterIP + selector: + app: mysql + ports: + - port: 3306 + targetPort: 3306 +--- +apiVersion: v1 +kind: Secret +metadata: + name: mysql-secret +data: + config: TVlTUUxfSE9TVD0ibXlzcWwtc2VydmljZSIKTVlTUUxfVVNFUj0icm9vdCIKTVlTUUxfUEFTU1dPUkQ9InJvb3QiCk1ZU1FMX0RBVEFCQVNFPSJiZW5jaG1hcmsi + +#grafana +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: grafana-deployment +spec: + selector: + matchLabels: + app: grafana + template: + metadata: + labels: + app: grafana + spec: + securityContext: + fsGroup: 472 + runAsUser: 472 + runAsGroup: 472 + runAsNonRoot: true + containers: + - name: grafana + image: grafana/grafana + imagePullPolicy: IfNotPresent + resources: + requests: + memory: "512Mi" + limits: + memory: "512Mi" + ports: + - containerPort: 3000 + volumeMounts: + # - mountPath: /var/lib/grafana/ + # name: grafana-pvc + - mountPath: /etc/grafana/ + name: grafana-config + volumes: + - name: grafana-pvc + persistentVolumeClaim: + claimName: benchmark + - name: grafana-config + configMap: + name: grafana +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: grafana +data: + grafana.ini: | + default_timezone = Asia/Shanghai +--- +apiVersion: v1 +kind: Service +metadata: + name: grafana +spec: + selector: + app: grafana + ports: + - port: 3000 + targetPort: 3000 + externalTrafficPolicy: Local + type: LoadBalancer +--- diff --git a/dubbo-benchmark-proposals/kubernetes/pvc.yaml b/dubbo-benchmark-proposals/kubernetes/pvc.yaml new file mode 100644 index 00000000000..3d35cec890a --- /dev/null +++ b/dubbo-benchmark-proposals/kubernetes/pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: benchmark +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 120Gi + storageClassName: alicloud-disk-efficiency \ No newline at end of file diff --git "a/dubbo-benchmark-proposals/\350\207\252\345\212\250\345\214\226\347\232\204 Dubbo \346\241\206\346\236\266\344\270\216\345\215\217\350\256\256\346\200\247\350\203\275\345\237\272\345\207\206 Benchmark \346\234\272\345\210\266\344\270\216\345\271\263\345\217\260.md" "b/dubbo-benchmark-proposals/\350\207\252\345\212\250\345\214\226\347\232\204 Dubbo \346\241\206\346\236\266\344\270\216\345\215\217\350\256\256\346\200\247\350\203\275\345\237\272\345\207\206 Benchmark \346\234\272\345\210\266\344\270\216\345\271\263\345\217\260.md" new file mode 100644 index 00000000000..90cdfe425a8 --- /dev/null +++ "b/dubbo-benchmark-proposals/\350\207\252\345\212\250\345\214\226\347\232\204 Dubbo \346\241\206\346\236\266\344\270\216\345\215\217\350\256\256\346\200\247\350\203\275\345\237\272\345\207\206 Benchmark \346\234\272\345\210\266\344\270\216\345\271\263\345\217\260.md" @@ -0,0 +1,52 @@ +# 自动化的 Dubbo 框架与协议性能基准 Benchmark 机制与平台 + +--- +* 队名:整点薯条 +* 作者:icodening + +## Objective + +--- + +在本设计内,我们主要目标是基于Grafana和Kubernetes构建一个自动化的Dubbo Benchmark机制,实现对Dubbo框架中的各种协议组合的性能基准Benchmark的自动化采集。该套机制需要支持的内容如下。 + +* 支持自定义协议组合的采集,如dubbo+fastjson2,dubbo+hessian,triple+protobuf等 +* 支持自定义调度采集性能基准指标,如每天1次,每周1次等 +* 支持对不同协议、框架的性能基准对比及展示,如dubbo、grpc、spring cloud多种框架的对比 +* 支持RT和OPS指标的对比 + +## Background + +--- + +随着Dubbo框架的广泛应用,对其性能的要求也日益增加。为了确保Dubbo在各种场景下的性能表现,需要建立一个自动化的性能评估平台,以便对Dubbo进行全面的性能测试和评估。对用户而言,建设该平台后也能提供一个更直观的性能数据供用户参考。 + +## Proposal + +--- + +整个自动化benchmark机制主要分为以下几个步骤: + +1. 编写benchmark脚本,用于输出benchmark指标信息 +2. 定时触发已编排好的benchmark任务 +3. 将benchmark输出的结果文件按照一定的解析方式解析出关键数据 +4. 将解析出来的数据写入持久层中 +5. 将采集到的数据通过web图表的方式输出并展示 + +对于第一步,我们可以编写shell脚本,其大致逻辑为克隆dubbo仓库指定分支(可配置)并安装到本地maven仓库,克隆dubbo-benchmark工程并使用指定版本的dubbo开始基准性能测试 + +针对第二步,在Linux中我们可以通过crontab的方式实现定时调度,而在Kubernetes中我们可以通过cronjob的方式实现定时调度,这里我们基于Kubernetes平台实现该机制。 + +针对第三步,我们可以选择易读且易处理的JSON文件格式格式进行输出,这个可以在JMH中进行配置。 + +针对第四步,这里我们选择了比较主流的MySQL存储方式对benchmark数据做持久化。 + +而最后一步中,我们选择了美观易用的Grafana平台对MySQL中存储的benchmark指标进行展示。 + +基于以上方案实现后的效果如下图所示。 + +![image-1](./assets/image-1.png) + +![image-2](./assets/image-2.png) + +可以看到该平台支持展示不同框架的tps对比,如dubbo、grpc、spring-cloud之间的对比。同时也比较不同协议下的性能表现,如triple协议,dubbo协议,grpc协议,rest协议(基于spring cloud)之间的对比。还可以展示针对dubbo协议下,搭配不同的序列化方式的性能差异。