feat: 模板、测试用例、readme提交
This commit is contained in:
121
README.md
121
README.md
@@ -1,92 +1,39 @@
|
||||
# Cn reporter template
|
||||
# CN报告模板
|
||||
|
||||
CN报告模板
|
||||
对报告的模板、测试用例进行版本控制。目录结构为:
|
||||
yyyy-MM-dd
|
||||
— [报告名称]
|
||||
— — test
|
||||
— — — html
|
||||
— — — — test1.js
|
||||
— — — — test2.js
|
||||
— — — — testTemplate.html(使用testN.js测试数据的测试文件)
|
||||
— — — freemarker
|
||||
— — — — config.json
|
||||
— — — — test1.json
|
||||
— — — — test2.json
|
||||
— — template.html(带有假数据的,可以查看完整效果的文件)
|
||||
— — template.ftl
|
||||
|
||||
## Getting started
|
||||
## 模板编写注意事项
|
||||
1.
|
||||
## 测试用例说明
|
||||
1. 代表性:代表并覆盖各种合理的、不合理的,合法的、不合法的,边界的、越界的输入数据;
|
||||
2. 可判定性:用例执行结果的正确性是可判定的;
|
||||
3. 紧急情况测试用例可暂缓,后续补上;
|
||||
|
||||
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
||||
#### html
|
||||
1. 样式
|
||||
布局样式在开发时即可判断调整,不作为重点。具体内容样式有注意点,例如单元格内容、图表label遮挡等,写测试用例时需考虑。
|
||||
2. JS
|
||||
JS是测试重点,需要列举各种可能的数据结果。sql执行结果和freemarker方案具有一些确定性特点:
|
||||
`1). 数组型结果中,每个对象的属性名是一致的;`
|
||||
`2). 数组型结果的长度可能为0;`
|
||||
因此测试用例可免去一些不合法情况。结合“测试用例说明”,现对测试用例做以下要求:
|
||||
`· 用例中至少有一部分数据(数组型至少有一项,环比至少有一对)自己是知道正确结果的,例如sessions: 1052400,那我知道它应展示为1052.4K;`
|
||||
`· test1.js:空值。所有单值为0、数组为空数组、对象为空对象;`
|
||||
`· test2.js:掺零。对象的属性(包括数组中的对象)适当使用0,每个对象或每个数组中至少使用一次;`
|
||||
`· test3.js:环比。用于计算环比的数据,一是部分除数设为0,二是要设计环比基准不存在的情况,例如当前周期数据中有company: "抖音",而上周期company中没有"抖音";`
|
||||
|
||||
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
||||
#### freemarker
|
||||
|
||||
## Add your files
|
||||
|
||||
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
||||
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
||||
|
||||
```
|
||||
cd existing_repo
|
||||
git remote add origin https://git.mesalab.cn/cyber-narrator/cn-reporter-template.git
|
||||
git branch -M main
|
||||
git push -uf origin main
|
||||
```
|
||||
|
||||
## Integrate with your tools
|
||||
|
||||
- [ ] [Set up project integrations](https://git.mesalab.cn/cyber-narrator/cn-reporter-template/-/settings/integrations)
|
||||
|
||||
## Collaborate with your team
|
||||
|
||||
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
|
||||
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
||||
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
||||
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
||||
- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
|
||||
|
||||
## Test and Deploy
|
||||
|
||||
Use the built-in continuous integration in GitLab.
|
||||
|
||||
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
|
||||
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
|
||||
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
||||
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
|
||||
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
||||
|
||||
***
|
||||
|
||||
# Editing this README
|
||||
|
||||
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
|
||||
|
||||
## Suggestions for a good README
|
||||
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
||||
|
||||
## Name
|
||||
Choose a self-explaining name for your project.
|
||||
|
||||
## Description
|
||||
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
||||
|
||||
## Badges
|
||||
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
||||
|
||||
## Visuals
|
||||
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
||||
|
||||
## Installation
|
||||
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
||||
|
||||
## Usage
|
||||
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
||||
|
||||
## Support
|
||||
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
||||
|
||||
## Roadmap
|
||||
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
||||
|
||||
## Contributing
|
||||
State if you are open to contributions and what your requirements are for accepting them.
|
||||
|
||||
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
||||
|
||||
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
||||
|
||||
## Authors and acknowledgment
|
||||
Show your appreciation to those who have contributed to the project.
|
||||
|
||||
## License
|
||||
For open source projects, say how it is licensed.
|
||||
|
||||
## Project status
|
||||
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|
||||
|
||||
2442
template/2022-04-28/字节跳动网络服务质量监测报告(IDC精简版)/template.ftl
Normal file
2442
template/2022-04-28/字节跳动网络服务质量监测报告(IDC精简版)/template.ftl
Normal file
File diff suppressed because it is too large
Load Diff
2643
template/2022-04-28/字节跳动网络服务质量监测报告(IDC精简版)/template.html
Normal file
2643
template/2022-04-28/字节跳动网络服务质量监测报告(IDC精简版)/template.html
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,183 @@
|
||||
{
|
||||
"isRepeat": 1,
|
||||
"cronExpression":"0 0 17 * * ? *",
|
||||
"startTime": "",
|
||||
"endTime": "",
|
||||
"timeConfig": {
|
||||
"type": "yesterday",
|
||||
"offset": 0,
|
||||
"unit": ""
|
||||
},
|
||||
"dataset": [
|
||||
{
|
||||
"querySql": "SELECT SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime}",
|
||||
"type": "table",
|
||||
"valueAlias": "trafficTotal"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动'))",
|
||||
"type": "table",
|
||||
"valueAlias": "xxxServiceTrafficTotal"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes FROM session_record_cn WHERE common_recv_time >= ${startTime} - 86400 AND common_recv_time < ${endTime} - 86400 AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动'))",
|
||||
"type": "table",
|
||||
"valueAlias": "preXxxServiceTrafficTotal"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(common_c2s_byte_num) AS egress_bytes, SUM(common_s2c_byte_num) AS ingress_bytes, SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND client_region NOT IN ('IDC') AND server_region IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动'))",
|
||||
"type": "table",
|
||||
"valueAlias": "outOfXxxServiceTrafficTotal"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(common_c2s_byte_num) AS egress_bytes, SUM(common_s2c_byte_num) AS ingress_bytes, SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes FROM session_record_cn WHERE common_recv_time >= ${startTime} - 86400 AND common_recv_time < ${endTime} - 86400 AND client_region NOT IN ('IDC') AND server_region IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动'))",
|
||||
"type": "table",
|
||||
"valueAlias": "preOutOfXxxServiceTrafficTotal"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(common_c2s_byte_num) AS egress_bytes, SUM(common_s2c_byte_num) AS ingress_bytes, SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND client_region IN ( 'IPTV', 'VBAS测试', '阿克苏', '阿勒泰', '巴州', '博州', '昌吉', '哈密', '和田', '喀什', '克拉玛依', '克州', '奎屯', '区公司', '石河子', '塔城', '吐鲁番', '乌鲁木齐', '伊犁', '移动互联网', '移动网','预留') AND server_region IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动'))",
|
||||
"type": "table",
|
||||
"valueAlias": "outOfXxxServiceRegionTrafficTotal"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(common_c2s_byte_num) AS egress_bytes, SUM(common_s2c_byte_num) AS ingress_bytes, SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes FROM session_record_cn WHERE common_recv_time >= ${startTime} - 86400 AND common_recv_time < ${endTime} - 86400 AND client_region IN ( 'IPTV', 'VBAS测试', '阿克苏', '阿勒泰', '巴州', '博州', '昌吉', '哈密', '和田', '喀什', '克拉玛依', '克州', '奎屯', '区公司', '石河子', '塔城', '吐鲁番', '乌鲁木齐', '伊犁', '移动互联网', '移动网','预留') AND server_region IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动'))",
|
||||
"type": "table",
|
||||
"valueAlias": "preOutOfXxxServiceRegionTrafficTotal"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(common_c2s_byte_num) AS egress_bytes, SUM(common_s2c_byte_num) AS ingress_bytes, SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND client_region IN ('IDC') AND server_region NOT IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动'))",
|
||||
"type": "table",
|
||||
"valueAlias": "xxxServiceOfOutTrafficTotal"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(common_c2s_byte_num) AS egress_bytes, SUM(common_s2c_byte_num) AS ingress_bytes, SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes FROM session_record_cn WHERE common_recv_time >= ${startTime} - 86400 AND common_recv_time < ${endTime} - 86400 AND client_region IN ('IDC') AND server_region NOT IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动'))",
|
||||
"type": "table",
|
||||
"valueAlias": "preXxxServiceOfOutTrafficTotal"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(common_c2s_byte_num) AS egress_bytes, SUM(common_s2c_byte_num) AS ingress_bytes, SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND client_region IN ('IDC') AND server_region IN ( 'IPTV', 'VBAS测试', '阿克苏', '阿勒泰', '巴州', '博州', '昌吉', '哈密', '和田', '喀什', '克拉玛依', '克州', '奎屯', '区公司', '石河子', '塔城', '吐鲁番', '乌鲁木齐', '伊犁', '移动互联网', '移动网','预留') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动'))",
|
||||
"type": "table",
|
||||
"valueAlias": "xxxServiceOfOutRegionTrafficTotal"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(common_c2s_byte_num) AS egress_bytes, SUM(common_s2c_byte_num) AS ingress_bytes, SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes FROM session_record_cn WHERE common_recv_time >= ${startTime} - 86400 AND common_recv_time < ${endTime} - 86400 AND client_region IN ('IDC') AND server_region IN ( 'IPTV', 'VBAS测试', '阿克苏', '阿勒泰', '巴州', '博州', '昌吉', '哈密', '和田', '喀什', '克拉玛依', '克州', '奎屯', '区公司', '石河子', '塔城', '吐鲁番', '乌鲁木齐', '伊犁', '移动互联网', '移动网','预留') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动'))",
|
||||
"type": "table",
|
||||
"valueAlias": "preXxxServiceOfOutRegionTrafficTotal"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT ROUND(QUANTILE(rate, 0.5), 4) AS rate50, ROUND(QUANTILE(rate, 0.9), 4) AS rate90, ROUND(QUANTILE(rate, 0.99), 4) AS rate99, ROUND(AVG(rate), 4) AS rate_avg, ROUND(max(rate), 4) AS rate_max, ROUND(min(rate), 4) AS rate_min FROM ( SELECT SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes, (bytes * 8) / 300 AS rate, toDateTime(toStartOfInterval(toDateTime(common_recv_time), INTERVAL 5 MINUTE)) AS granularity FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY granularity)",
|
||||
"type": "table",
|
||||
"valueAlias": "xxxServiceRate"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT ROUND(QUANTILE(rate, 0.5), 4) AS rate50, ROUND(QUANTILE(rate, 0.9), 4) AS rate90, ROUND(QUANTILE(rate, 0.99), 4) AS rate99, ROUND(AVG(rate), 4) AS rate_avg, ROUND(max(rate), 4) AS rate_max, ROUND(min(rate), 4) AS rate_min FROM ( SELECT SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes, (bytes * 8) / 300 AS rate, toDateTime(toStartOfInterval(toDateTime(common_recv_time), INTERVAL 5 MINUTE)) AS granularity FROM session_record_cn WHERE common_recv_time >= ${startTime} - 86400 AND common_recv_time < ${endTime} - 86400 AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY granularity)",
|
||||
"type": "table",
|
||||
"valueAlias": "preXxxServiceRate"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT TIME_FLOOR_WITH_FILL(UNIX_TIMESTAMP(common_recv_time),'PT5M','zero') AS stat_time, SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes, ROUND(bytes * 8/300) rate FROM session_record_cn WHERE common_recv_time >= toDateTime(${startTime}) AND common_recv_time < toDateTime(${endTime}) AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY stat_time ORDER BY stat_time ASC",
|
||||
"type": "table",
|
||||
"valueAlias": "xxxServiceTrafficChangingCurve"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(bytes) AS all_bytes, ROUND(QUANTILE(establish_latency,0.5), 4) AS establish_latency_p50, ROUND(QUANTILE(establish_latency,0.9), 4) AS establish_latency_p90, ROUND(QUANTILE(establish_latency,0.99), 4) AS establish_latency_p99, ROUND(AVG(establish_latency), 4) AS establish_latency_avg, ROUND(MAX(establish_latency), 4) AS establish_latency_max, ROUND(MIN(establish_latency), 4) AS establish_latency_min FROM ( SELECT SUM(common_c2s_pkt_num + common_s2c_pkt_num) AS bytes, ROUND(AVG(common_establish_latency_ms)) AS establish_latency, toDateTime(toStartOfInterval(toDateTime(common_recv_time),INTERVAL 300 SECOND)) AS granularity FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND common_l4_protocol IN ('IPv4_TCP', 'IPv6_TCP') AND client_region NOT IN ('IDC') AND server_region IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY granularity)",
|
||||
"type": "table",
|
||||
"valueAlias": "outOfXxxServiceTCP"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(bytes) AS all_bytes, ROUND(QUANTILE(establish_latency,0.5), 4) AS establish_latency_p50, ROUND(QUANTILE(establish_latency,0.9), 4) AS establish_latency_p90, ROUND(QUANTILE(establish_latency,0.99), 4) AS establish_latency_p99, ROUND(AVG(establish_latency), 4) AS establish_latency_avg, ROUND(MAX(establish_latency), 4) AS establish_latency_max, ROUND(MIN(establish_latency), 4) AS establish_latency_min FROM ( SELECT SUM(common_c2s_pkt_num + common_s2c_pkt_num) AS bytes, ROUND(AVG(common_establish_latency_ms)) AS establish_latency, toDateTime(toStartOfInterval(toDateTime(common_recv_time),INTERVAL 300 SECOND)) AS granularity FROM session_record_cn WHERE common_recv_time >= ${startTime} - 86400 AND common_recv_time < ${endTime} - 86400 AND common_l4_protocol IN ('IPv4_TCP', 'IPv6_TCP') AND client_region NOT IN ('IDC') AND server_region IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY granularity)",
|
||||
"type": "table",
|
||||
"valueAlias": "preOutOfXxxServiceTCP"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(bytes) AS all_bytes, ROUND(QUANTILE(sequence_gap_loss_percent,0.5), 4) as sequence_gap_loss_p50, ROUND(QUANTILE(sequence_gap_loss_percent,0.9), 4) as sequence_gap_loss_p90, ROUND(QUANTILE(sequence_gap_loss_percent,0.99), 4) as sequence_gap_loss_p99, ROUND(AVG(sequence_gap_loss_percent), 4) as sequence_gap_loss_avg, ROUND(max(sequence_gap_loss_percent), 4) as sequence_gap_loss_max, ROUND(min(sequence_gap_loss_percent), 4) as sequence_gap_loss_min FROM ( SELECT SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes, ROUND(SUM(common_c2s_tcp_lostlen + common_s2c_tcp_lostlen)/SUM(common_c2s_byte_num + common_s2c_byte_num + common_c2s_tcp_lostlen + common_s2c_tcp_lostlen),4) AS sequence_gap_loss_percent, toDateTime(toStartOfInterval(toDateTime(common_recv_time),INTERVAL 300 SECOND)) as granularity FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND common_l4_protocol IN ('IPv4_TCP', 'IPv6_TCP') AND client_region NOT IN ('IDC') AND server_region IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY granularity)",
|
||||
"type": "table",
|
||||
"valueAlias": "outOfXxxServiceLoss"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(bytes) AS all_bytes, ROUND(QUANTILE(sequence_gap_loss_percent,0.5), 4) as sequence_gap_loss_p50, ROUND(QUANTILE(sequence_gap_loss_percent,0.9), 4) as sequence_gap_loss_p90, ROUND(QUANTILE(sequence_gap_loss_percent,0.99), 4) as sequence_gap_loss_p99, ROUND(AVG(sequence_gap_loss_percent), 4) as sequence_gap_loss_avg, ROUND(max(sequence_gap_loss_percent), 4) as sequence_gap_loss_max, ROUND(min(sequence_gap_loss_percent), 4) as sequence_gap_loss_min FROM ( SELECT SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes, ROUND(SUM(common_c2s_tcp_lostlen + common_s2c_tcp_lostlen)/SUM(common_c2s_byte_num + common_s2c_byte_num + common_c2s_tcp_lostlen + common_s2c_tcp_lostlen),4) AS sequence_gap_loss_percent, toDateTime(toStartOfInterval(toDateTime(common_recv_time),INTERVAL 300 SECOND)) as granularity FROM session_record_cn WHERE common_recv_time >= ${startTime} - 86400 AND common_recv_time < ${endTime} - 86400 AND common_l4_protocol IN ('IPv4_TCP', 'IPv6_TCP') AND client_region NOT IN ('IDC') AND server_region IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY granularity)",
|
||||
"type": "table",
|
||||
"valueAlias": "preOutOfXxxServiceLoss"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(bytes) AS all_bytes, ROUND(QUANTILE(establish_latency,0.5), 4) AS establish_latency_p50, ROUND(QUANTILE(establish_latency,0.9), 4) AS establish_latency_p90, ROUND(QUANTILE(establish_latency,0.99), 4) AS establish_latency_p99, ROUND(AVG(establish_latency), 4) AS establish_latency_avg, ROUND(MAX(establish_latency), 4) AS establish_latency_max, ROUND(MIN(establish_latency), 4) AS establish_latency_min FROM ( SELECT SUM(common_c2s_pkt_num + common_s2c_pkt_num) AS bytes, ROUND(AVG(common_establish_latency_ms)) AS establish_latency, toDateTime(toStartOfInterval(toDateTime(common_recv_time),INTERVAL 300 SECOND)) AS granularity FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND common_l4_protocol IN ('IPv4_TCP', 'IPv6_TCP') AND client_region IN ('IDC') AND server_region NOT IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY granularity)",
|
||||
"type": "table",
|
||||
"valueAlias": "xxxServiceOfOutTCP"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(bytes) AS all_bytes, ROUND(QUANTILE(establish_latency,0.5), 4) AS establish_latency_p50, ROUND(QUANTILE(establish_latency,0.9), 4) AS establish_latency_p90, ROUND(QUANTILE(establish_latency,0.99), 4) AS establish_latency_p99, ROUND(AVG(establish_latency), 4) AS establish_latency_avg, ROUND(MAX(establish_latency), 4) AS establish_latency_max, ROUND(MIN(establish_latency), 4) AS establish_latency_min FROM ( SELECT SUM(common_c2s_pkt_num + common_s2c_pkt_num) AS bytes, ROUND(AVG(common_establish_latency_ms)) AS establish_latency, toDateTime(toStartOfInterval(toDateTime(common_recv_time),INTERVAL 300 SECOND)) AS granularity FROM session_record_cn WHERE common_recv_time >= ${startTime} - 86400 AND common_recv_time < ${endTime} - 86400 AND common_l4_protocol IN ('IPv4_TCP', 'IPv6_TCP') AND client_region IN ('IDC') AND server_region NOT IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY granularity)",
|
||||
"type": "table",
|
||||
"valueAlias": "preXxxServiceOfOutTCP"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(bytes) AS all_bytes, ROUND(QUANTILE(sequence_gap_loss_percent,0.5), 4) as sequence_gap_loss_p50, ROUND(QUANTILE(sequence_gap_loss_percent,0.9), 4) as sequence_gap_loss_p90, ROUND(QUANTILE(sequence_gap_loss_percent,0.99), 4) as sequence_gap_loss_p99, ROUND(AVG(sequence_gap_loss_percent), 4) as sequence_gap_loss_avg, ROUND(max(sequence_gap_loss_percent), 4) as sequence_gap_loss_max, ROUND(min(sequence_gap_loss_percent), 4) as sequence_gap_loss_min FROM ( SELECT SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes, ROUND(SUM(common_c2s_tcp_lostlen + common_s2c_tcp_lostlen)/SUM(common_c2s_byte_num + common_s2c_byte_num + common_c2s_tcp_lostlen + common_s2c_tcp_lostlen),4) AS sequence_gap_loss_percent, toDateTime(toStartOfInterval(toDateTime(common_recv_time),INTERVAL 300 SECOND)) as granularity FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND common_l4_protocol IN ('IPv4_TCP', 'IPv6_TCP') AND client_region IN ('IDC') AND server_region NOT IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY granularity)",
|
||||
"type": "table",
|
||||
"valueAlias": "xxxServiceOfOutLoss"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(bytes) AS all_bytes, ROUND(QUANTILE(sequence_gap_loss_percent,0.5), 4) as sequence_gap_loss_p50, ROUND(QUANTILE(sequence_gap_loss_percent,0.9), 4) as sequence_gap_loss_p90, ROUND(QUANTILE(sequence_gap_loss_percent,0.99), 4) as sequence_gap_loss_p99, ROUND(AVG(sequence_gap_loss_percent), 4) as sequence_gap_loss_avg, ROUND(max(sequence_gap_loss_percent), 4) as sequence_gap_loss_max, ROUND(min(sequence_gap_loss_percent), 4) as sequence_gap_loss_min FROM ( SELECT SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes, ROUND(SUM(common_c2s_tcp_lostlen + common_s2c_tcp_lostlen)/SUM(common_c2s_byte_num + common_s2c_byte_num + common_c2s_tcp_lostlen + common_s2c_tcp_lostlen),4) AS sequence_gap_loss_percent, toDateTime(toStartOfInterval(toDateTime(common_recv_time),INTERVAL 300 SECOND)) as granularity FROM session_record_cn WHERE common_recv_time >= ${startTime} - 86400 AND common_recv_time < ${endTime} - 86400 AND common_l4_protocol IN ('IPv4_TCP', 'IPv6_TCP') AND client_region IN ('IDC') AND server_region NOT IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY granularity)",
|
||||
"type": "table",
|
||||
"valueAlias": "preXxxServiceOfOutLoss"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT client_province AS client_province, SUM(egress_bytes) AS egress_bytes, SUM(ingress_bytes) AS ingress_bytes, SUM(bytes) AS bytes, ROUND(AVG(egress_rate), 4) AS egress_rate_avg, ROUND(MAX(egress_rate), 4) AS egress_rate_max, ROUND(MIN(egress_rate), 4) AS egress_rate_min, ROUND(AVG(ingress_rate), 4) AS ingress_rate_avg, ROUND(MAX(ingress_rate), 4) AS ingress_rate_max, ROUND(MIN(ingress_rate), 4) AS ingress_rate_min FROM ( SELECT client_province AS client_province, SUM(common_c2s_byte_num) AS egress_bytes, SUM(common_s2c_byte_num) AS ingress_bytes, SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes, (egress_bytes * 8) / (300) AS egress_rate, (ingress_bytes * 8) / (300) AS ingress_rate, toDateTime(toStartOfInterval(toDateTime(common_recv_time), INTERVAL 5 MINUTE)) AS granularity FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) AND server_region IN ('IDC') AND client_province in ( SELECT client_province AS client_province FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND notEmpty(client_province) AND client_region NOT IN ('IDC') AND server_region IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY client_province ORDER BY SUM(common_c2s_byte_num + common_s2c_byte_num) DESC LIMIT 10 ) GROUP BY granularity, client_province) GROUP BY client_province ORDER BY bytes DESC LIMIT 10",
|
||||
"type": "table",
|
||||
"valueAlias": "top10ProvinceOutOfXxxService"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT client_province AS client_province, SUM(egress_bytes) AS egress_bytes, SUM(ingress_bytes) AS ingress_bytes, SUM(bytes) AS bytes, ROUND(AVG(egress_rate), 4) AS egress_rate_avg, ROUND(MAX(egress_rate), 4) AS egress_rate_max, ROUND(MIN(egress_rate), 4) AS egress_rate_min, ROUND(AVG(ingress_rate), 4) AS ingress_rate_avg, ROUND(MAX(ingress_rate), 4) AS ingress_rate_max, ROUND(MIN(ingress_rate), 4) AS ingress_rate_min FROM ( SELECT client_province AS client_province, SUM(common_c2s_byte_num) AS egress_bytes, SUM(common_s2c_byte_num) AS ingress_bytes, SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes, (egress_bytes * 8) / (300) AS egress_rate, (ingress_bytes * 8) / (300) AS ingress_rate, toDateTime(toStartOfInterval(toDateTime(common_recv_time), INTERVAL 5 MINUTE)) AS granularity FROM session_record_cn WHERE common_recv_time >= ${startTime} - 86400 AND common_recv_time < ${endTime} - 86400 AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) AND server_region IN ('IDC') AND client_province in ( SELECT client_province AS client_province FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND notEmpty(client_province) AND client_region NOT IN ('IDC') AND server_region IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY client_province ORDER BY SUM(common_c2s_byte_num + common_s2c_byte_num) DESC LIMIT 10 ) GROUP BY granularity, client_province) GROUP BY client_province ORDER BY bytes DESC LIMIT 10",
|
||||
"type": "table",
|
||||
"valueAlias": "preTop10ProvinceOutOfXxxService"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT server_province AS server_province, SUM(egress_bytes) AS egress_bytes, SUM(ingress_bytes) AS ingress_bytes, SUM(bytes) AS bytes, ROUND(AVG(egress_rate), 4) AS egress_rate_avg, ROUND(MAX(egress_rate), 4) AS egress_rate_max, ROUND(MIN(egress_rate), 4) AS egress_rate_min, ROUND(AVG(ingress_rate), 4) AS ingress_rate_avg, ROUND(MAX(ingress_rate), 4) AS ingress_rate_max, ROUND(MIN(ingress_rate), 4) AS ingress_rate_min FROM ( SELECT server_province AS server_province, SUM(common_c2s_byte_num) AS egress_bytes, SUM(common_s2c_byte_num) AS ingress_bytes, SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes, (egress_bytes * 8) / (300) AS egress_rate, (ingress_bytes * 8) / (300) AS ingress_rate, toDateTime(toStartOfInterval(toDateTime(common_recv_time), INTERVAL 5 MINUTE)) AS granularity FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) AND client_region IN ('IDC') AND server_province in ( SELECT server_province AS server_province FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND notEmpty(server_province) AND client_region IN ('IDC') AND server_region NOT IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY server_province ORDER BY SUM(common_c2s_byte_num + common_s2c_byte_num) DESC LIMIT 10 ) GROUP BY granularity, server_province) GROUP BY server_province ORDER BY bytes DESC LIMIT 10",
|
||||
"type": "table",
|
||||
"valueAlias": "top10ProvinceXxxServiceOfOut"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT server_province AS server_province, SUM(egress_bytes) AS egress_bytes, SUM(ingress_bytes) AS ingress_bytes, SUM(bytes) AS bytes, ROUND(AVG(egress_rate), 4) AS egress_rate_avg, ROUND(MAX(egress_rate), 4) AS egress_rate_max, ROUND(MIN(egress_rate), 4) AS egress_rate_min, ROUND(AVG(ingress_rate), 4) AS ingress_rate_avg, ROUND(MAX(ingress_rate), 4) AS ingress_rate_max, ROUND(MIN(ingress_rate), 4) AS ingress_rate_min FROM ( SELECT server_province AS server_province, SUM(common_c2s_byte_num) AS egress_bytes, SUM(common_s2c_byte_num) AS ingress_bytes, SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes, (egress_bytes * 8) / (300) AS egress_rate, (ingress_bytes * 8) / (300) AS ingress_rate, toDateTime(toStartOfInterval(toDateTime(common_recv_time), INTERVAL 5 MINUTE)) AS granularity FROM session_record_cn WHERE common_recv_time >= ${startTime} - 86400 AND common_recv_time < ${endTime} - 86400 AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) AND client_region IN ('IDC') AND server_province in ( SELECT server_province AS server_province FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND notEmpty(server_province) AND client_region IN ('IDC') AND server_region NOT IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY server_province ORDER BY SUM(common_c2s_byte_num + common_s2c_byte_num) DESC LIMIT 10 ) GROUP BY granularity, server_province) GROUP BY server_province ORDER BY bytes DESC LIMIT 10",
|
||||
"type": "table",
|
||||
"valueAlias": "preTop10ProvinceXxxServiceOfOut"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT client_region AS client_region, SUM(egress_bytes) AS egress_bytes, SUM(ingress_bytes) AS ingress_bytes, SUM(bytes) AS bytes, ROUND(AVG(egress_rate), 4) AS egress_rate_avg, ROUND(MAX(egress_rate), 4) AS egress_rate_max, ROUND(MIN(egress_rate), 4) AS egress_rate_min, ROUND(AVG(ingress_rate), 4) AS ingress_rate_avg, ROUND(MAX(ingress_rate), 4) AS ingress_rate_max, ROUND(MIN(ingress_rate), 4) AS ingress_rate_min FROM ( SELECT client_region AS client_region, SUM(common_c2s_byte_num) AS egress_bytes, SUM(common_s2c_byte_num) AS ingress_bytes, SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes, (egress_bytes * 8) / (300) AS egress_rate, (ingress_bytes * 8) / (300) AS ingress_rate, toDateTime(toStartOfInterval(toDateTime(common_recv_time), INTERVAL 5 MINUTE)) AS granularity FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) AND server_region IN ('IDC') AND client_region in ( SELECT client_region AS client_region FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND client_region IN ('IPTV', 'VBAS测试', '阿克苏', '阿勒泰', '巴州', '博州', '昌吉', '哈密', '和田', '喀什', '克拉玛依', '克州', '奎屯', '区公司', '石河子', '塔城', '吐鲁番', '乌鲁木齐', '伊犁', '移动互联网', '移动网','预留') AND server_region IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY client_region ORDER BY SUM(common_c2s_byte_num + common_s2c_byte_num) DESC LIMIT 10 ) GROUP BY granularity, client_region) GROUP BY client_region ORDER BY bytes DESC LIMIT 10",
|
||||
"type": "table",
|
||||
"valueAlias": "top10RegionOutOfXxxService"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT client_region AS client_region, SUM(egress_bytes) AS egress_bytes, SUM(ingress_bytes) AS ingress_bytes, SUM(bytes) AS bytes, ROUND(AVG(egress_rate), 4) AS egress_rate_avg, ROUND(MAX(egress_rate), 4) AS egress_rate_max, ROUND(MIN(egress_rate), 4) AS egress_rate_min, ROUND(AVG(ingress_rate), 4) AS ingress_rate_avg, ROUND(MAX(ingress_rate), 4) AS ingress_rate_max, ROUND(MIN(ingress_rate), 4) AS ingress_rate_min FROM ( SELECT client_region AS client_region, SUM(common_c2s_byte_num) AS egress_bytes, SUM(common_s2c_byte_num) AS ingress_bytes, SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes, (egress_bytes * 8) / (300) AS egress_rate, (ingress_bytes * 8) / (300) AS ingress_rate, toDateTime(toStartOfInterval(toDateTime(common_recv_time), INTERVAL 5 MINUTE)) AS granularity FROM session_record_cn WHERE common_recv_time >= ${startTime} - 86400 AND common_recv_time < ${endTime} - 86400 AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) AND server_region IN ('IDC') AND client_region in ( SELECT client_region AS client_region FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND client_region IN ('IPTV', 'VBAS测试', '阿克苏', '阿勒泰', '巴州', '博州', '昌吉', '哈密', '和田', '喀什', '克拉玛依', '克州', '奎屯', '区公司', '石河子', '塔城', '吐鲁番', '乌鲁木齐', '伊犁', '移动互联网', '移动网','预留') AND server_region IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY client_region ORDER BY SUM(common_c2s_byte_num + common_s2c_byte_num) DESC LIMIT 10 ) GROUP BY granularity, client_region) GROUP BY client_region ORDER BY bytes DESC LIMIT 10",
|
||||
"type": "table",
|
||||
"valueAlias": "preTop10OutOfXxxService"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT server_region AS server_region, SUM(egress_bytes) AS egress_bytes, SUM(ingress_bytes) AS ingress_bytes, SUM(bytes) AS bytes, ROUND(AVG(egress_rate), 4) AS egress_rate_avg, ROUND(MAX(egress_rate), 4) AS egress_rate_max, ROUND(MIN(egress_rate), 4) AS egress_rate_min, ROUND(AVG(ingress_rate), 4) AS ingress_rate_avg, ROUND(MAX(ingress_rate), 4) AS ingress_rate_max, ROUND(MIN(ingress_rate), 4) AS ingress_rate_min FROM ( SELECT server_region AS server_region, SUM(common_c2s_byte_num) AS egress_bytes, SUM(common_s2c_byte_num) AS ingress_bytes, SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes, (egress_bytes * 8) / (300) AS egress_rate, (ingress_bytes * 8) / (300) AS ingress_rate, toDateTime(toStartOfInterval(toDateTime(common_recv_time), INTERVAL 5 MINUTE)) AS granularity FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) AND client_region IN ('IDC') AND server_region in ( SELECT server_region AS server_region FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND server_region IN ('IPTV', 'VBAS测试', '阿克苏', '阿勒泰', '巴州', '博州', '昌吉', '哈密', '和田', '喀什', '克拉玛依', '克州', '奎屯', '区公司', '石河子', '塔城', '吐鲁番', '乌鲁木齐', '伊犁', '移动互联网', '移动网','预留') AND client_region IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY server_region ORDER BY SUM(common_c2s_byte_num + common_s2c_byte_num) DESC LIMIT 10 ) GROUP BY granularity, server_region) GROUP BY server_region ORDER BY bytes DESC LIMIT 10",
|
||||
"type": "table",
|
||||
"valueAlias": "top10RegionXxxServiceOfOut"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT server_region AS server_region, SUM(egress_bytes) AS egress_bytes, SUM(ingress_bytes) AS ingress_bytes, SUM(bytes) AS bytes, ROUND(AVG(egress_rate), 4) AS egress_rate_avg, ROUND(MAX(egress_rate), 4) AS egress_rate_max, ROUND(MIN(egress_rate), 4) AS egress_rate_min, ROUND(AVG(ingress_rate), 4) AS ingress_rate_avg, ROUND(MAX(ingress_rate), 4) AS ingress_rate_max, ROUND(MIN(ingress_rate), 4) AS ingress_rate_min FROM ( SELECT server_region AS server_region, SUM(common_c2s_byte_num) AS egress_bytes, SUM(common_s2c_byte_num) AS ingress_bytes, SUM(common_c2s_byte_num + common_s2c_byte_num) AS bytes, (egress_bytes * 8) / (300) AS egress_rate, (ingress_bytes * 8) / (300) AS ingress_rate, toDateTime(toStartOfInterval(toDateTime(common_recv_time), INTERVAL 5 MINUTE)) AS granularity FROM session_record_cn WHERE common_recv_time >= ${startTime} - 86400 AND common_recv_time < ${endTime} - 86400 AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) AND client_region IN ('IDC') AND server_region in ( SELECT server_region AS server_region FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND server_region IN ('IPTV', 'VBAS测试', '阿克苏', '阿勒泰', '巴州', '博州', '昌吉', '哈密', '和田', '喀什', '克拉玛依', '克州', '奎屯', '区公司', '石河子', '塔城', '吐鲁番', '乌鲁木齐', '伊犁', '移动互联网', '移动网','预留') AND client_region IN ('IDC') AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY server_region ORDER BY SUM(common_c2s_byte_num + common_s2c_byte_num) DESC LIMIT 10 ) GROUP BY granularity, server_region) GROUP BY server_region ORDER BY bytes DESC LIMIT 10",
|
||||
"type": "table",
|
||||
"valueAlias": "preTop10RegionXxxServiceOfOut"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(common_s2c_byte_num) AS received_bytes, server_idc_renter AS server_idc_renter FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY server_idc_renter ORDER BY received_bytes DESC LIMIT 1",
|
||||
"type": "table",
|
||||
"valueAlias": "xxxServiceTrafficBytes"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(common_s2c_byte_num) AS received_bytes, client_idc_renter AS client_idc_renter FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND client_region IN ('IDC') AND server_region NOT IN ('IDC') AND client_idc_renter IN ('字节跳动') GROUP BY client_idc_renter ORDER BY received_bytes DESC LIMIT 1",
|
||||
"type": "table",
|
||||
"valueAlias": "xxxServiceMissCacheBytes"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(common_sessions) AS sessions, server_idc_renter AS server_idc_renter FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND (client_idc_renter IN ('字节跳动') OR server_idc_renter IN ('字节跳动')) GROUP BY server_idc_renter ORDER BY sessions DESC LIMIT 1",
|
||||
"type": "table",
|
||||
"valueAlias": "xxxServiceTotalSessions"
|
||||
},
|
||||
{
|
||||
"querySql": "SELECT SUM(common_sessions) AS sessions, client_idc_renter AS client_idc_renter FROM session_record_cn WHERE common_recv_time >= ${startTime} AND common_recv_time < ${endTime} AND client_region IN ('IDC') AND server_region NOT IN ('IDC') AND client_idc_renter IN ('字节跳动') GROUP BY client_idc_renter ORDER BY sessions DESC LIMIT 1",
|
||||
"type": "table",
|
||||
"valueAlias": "xxxServiceMissCacheSessions"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* 用例说明:
|
||||
* 本用例是空数据用例
|
||||
* */
|
||||
|
||||
/** 数据 begin */
|
||||
// 时间区间
|
||||
var timeRange = [1651075200, 1651161599]
|
||||
/* 1.1 流量变化曲线 */
|
||||
// sql-1 总流量
|
||||
var totalTraffic = 0
|
||||
// sql-2 字节跳动总流量
|
||||
var targetTotalTraffic = 0
|
||||
// sql-3 prev字节跳动总流量
|
||||
var prevTargetTotalTraffic = 0
|
||||
// sql-4 域外访问字节跳动总流量
|
||||
var outToInTotalTraffic = 0
|
||||
// sql-5 prev域外访问字节跳动总流量
|
||||
var prevOutToInTotalTraffic = 0
|
||||
// sql-6 字节跳动访问域外总流量
|
||||
var inToOutTotalTraffic = 0
|
||||
// sql-7 prev字节跳动访问域外总流量
|
||||
var prevInToOutTotalTraffic = 0
|
||||
// sql-8
|
||||
var quantile1 = {
|
||||
}
|
||||
// sql-10 流量变化曲线
|
||||
var trafficData = [
|
||||
]
|
||||
|
||||
/* 2.1 各省份流量分布 */
|
||||
// sql-19 Top 10省份流量分布(域外访问域内)
|
||||
var top10ProvinceOutToInTraffic = [
|
||||
]
|
||||
// sql-20
|
||||
var prevTop10ProvinceOutToInTraffic = [
|
||||
]
|
||||
// sql-21 Top 10省份流量分布(域内访问域外)
|
||||
var top10ProvinceInToOutTraffic = [
|
||||
]
|
||||
// sql-22
|
||||
var prevTop10ProvinceInToOutTraffic = [
|
||||
]
|
||||
|
||||
/* 2.2 省内各地区流量分布 */
|
||||
// sql-23(域外访问域内)
|
||||
var top10CityOutToInTraffic = []
|
||||
// sql-24
|
||||
var prevTop10CityOutToInTraffic = []
|
||||
// sql-25(域内访问域外)
|
||||
var top10CityInToOutTraffic = []
|
||||
// sql-26
|
||||
var prevTop10CityInToOutTraffic = []
|
||||
|
||||
/* 3. 内容收敛情况 */
|
||||
// sql-27 Top3 S2C总流量
|
||||
var top3S2cTotalTraffic = []
|
||||
// sql-28 未命中缓存S2C流量
|
||||
var missedCacheS2cTraffic = []
|
||||
// sql-29 Top3 会话总数
|
||||
var top3Sessions = []
|
||||
// sql-30 未命中缓存的会话
|
||||
var missedCacheSession = []
|
||||
/** 数据 end */
|
||||
File diff suppressed because it is too large
Load Diff
4241
template/2022-04-28/网络服务质量监测报告(IDC精简版)/template.ftl
Normal file
4241
template/2022-04-28/网络服务质量监测报告(IDC精简版)/template.ftl
Normal file
File diff suppressed because it is too large
Load Diff
5105
template/2022-04-28/网络服务质量监测报告(IDC精简版)/template.html
Normal file
5105
template/2022-04-28/网络服务质量监测报告(IDC精简版)/template.html
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user