CN-894: 单测用例--用例更新

This commit is contained in:
刘洪洪
2023-02-27 16:01:25 +08:00
parent def8851da0
commit ee14b471a8
32 changed files with 2597 additions and 502 deletions

View File

@@ -1,13 +1,13 @@
<template>
<div class="link-blocks">
<div class="block-list" style="position: relative">
<div class="block-list__title" v-if="!showError">{{ $t('linkMonitor.links') }}</div>
<div class="block-list__title" v-if="!showError1">{{ $t('linkMonitor.links') }}</div>
<!--无数据noData-->
<chart-no-data v-if="isNoData"></chart-no-data>
<chart-no-data v-if="linkNoData" test-id="linkBlockNoData"></chart-no-data>
<div class="block-list__list" v-show="!isNoData">
<chart-error v-if="showError" :content="errorMsg1" />
<div class="block-list__list" v-show="!linkNoData">
<chart-error v-if="showError1" :content="errorMsg1" />
<el-popover
v-else
placement="bottom"
@@ -57,12 +57,12 @@
</div>
<div class="block-list" >
<div class="block-list__title" v-if="!showError">{{ $t('linkMonitor.nextHopInternet') }}</div>
<div class="block-list__title" v-if="!showError2">{{ $t('linkMonitor.nextHopInternet') }}</div>
<chart-no-data v-if="isNoData"></chart-no-data>
<chart-no-data v-if="nextHopNoData" test-id="nextHpNoData"></chart-no-data>
<div class="block-list__list" v-show="!isNoData">
<chart-error v-if="showError" :content="errorMsg2" />
<div class="block-list__list" v-show="!nextHopNoData">
<chart-error v-if="showError2" :content="errorMsg2" />
<el-popover
v-else
placement="bottom"
@@ -91,13 +91,13 @@
<div class="popper-content__link-info">
<div class="info__label">{{ $t('linkMonitor.linkBlock.bandwidthUsage') }}</div>
<div class="info__value" style="display: flex">
<div>
<div :test-id="`nextHopEgressUsage${index}`">
<svg class="icon item-popover-up" aria-hidden="true">
<use xlink:href="#cn-icon-egress"></use>
</svg>
{{ convertValue(item.egressUsage) }}
</div>
<div>
<div :test-id="`nextHopIngressUsage${index}`">
<svg class="icon item-popover-down" aria-hidden="true">
<use xlink:href="#cn-icon-ingress"></use>
</svg>
@@ -135,12 +135,14 @@ export default {
},
data () {
return {
isNoData: false,
linkNoData: false,
nextHopNoData: false,
unitTypes,
linkData: [],
nextHopData: [],
gradientColor: ['#FF005C', '#40537E'], // [start, end]
showError: false,
showError1: false,
showError2: false,
errorMsg1: '',
errorMsg2: ''
}
@@ -182,16 +184,13 @@ export default {
const res = []
res[0] = response[0].data
res[1] = response[1].data
if (res[0].code === 200 && res[1].code === 200) {
this.showError = false
if (res[0].code === 200) {
this.showError1 = false
const linkData = res[0].data.result
const nextHopData = res[1].data.result
this.isNoData = linkData.length === 0 && nextHopData.length === 0
if (this.isNoData) {
return
}
this.linkNoData = linkData.length === 0
if (!this.linkNoData) {
const data = []
linkData.forEach(d => {
const info = linkInfo.find(i => i.originalLinkId === d.linkId)
@@ -237,7 +236,19 @@ export default {
s.popoverWidth = this.computePopoverWidth(s.egressUsage, s.ingressUsage)
})
this.linkData = sorted
}
} else {
this.linkNoData = false
this.showError1 = true
this.errorMsg1 = res[0].message
}
if (res[1].code === 200) {
this.showError2 = false
const nextHopData = res[1].data.result
this.nextHopNoData = nextHopData.length === 0
if (!this.nextHopNoData) {
let directionArr = []
nextHopData.forEach((item) => {
if (item.egressLinkDirection !== '' && item.ingressLinkDirection !== '') {
@@ -288,16 +299,18 @@ export default {
})
this.nextHopData = nextHopSorted
}
} else {
this.isNoData = false
this.showError = true
this.errorMsg1 = res[0].message
this.showError2 = true
this.nextHopNoData = false
this.errorMsg2 = res[1].message
}
}).catch(e => {
console.error(e)
this.isNoData = false
this.showError = true
this.linkNoData = false
this.nextHopNoData = false
this.showError1 = true
this.showError2 = true
// todo 此处数据还待验证
this.errorMsg1 = e.message
this.errorMsg2 = e.message

View File

@@ -146,9 +146,9 @@ export default {
// 接口数据乱序,根据入方向排序,再根据同个入方向下的出方向进行排序
nextLinkData.sort((a, b) => {
if (a.ingressLinkDirection !== b.ingressLinkDirection) {
return a.ingressLinkDirection.localeCompare(b.ingressLinkDirection, 'zh')
return a.ingressLinkDirection.localeCompare(b.ingressLinkDirection)
}
return a.egressLinkDirection.localeCompare(b.egressLinkDirection, 'zh')
return a.egressLinkDirection.localeCompare(b.egressLinkDirection)
})
this.isNextNoData = nextLinkData.length === 0

View File

@@ -3,7 +3,7 @@
<div class="dimension-title" v-if="gridData.length>3">{{ $t('linkMonitor.egressLink') }}&nbsp;&&nbsp;{{ $t('linkMonitor.ingressLink') }}</div>
<div class="dimension-title" v-else>{{ $t('linkMonitor.nextHopInternetOfGrid') }}</div>
<chart-no-data v-if="isNoData"></chart-no-data>
<chart-no-data v-if="isNoData" :test-id="`noData${gridData.length}`"></chart-no-data>
<chart-error class="link-block-error" v-if="showError" :content="content"/>

View File

@@ -53,7 +53,7 @@
</div>
</div>
<div style="height: calc(100% - 74px); position: relative">
<chart-no-data v-if="isNoData"></chart-no-data>
<chart-no-data v-if="isNoData" test-id="noData"></chart-no-data>
<div class="chart-drawing" v-show="showMarkLine && !isNoData" id="linkTrafficLineChart"></div>
</div>
</div>
@@ -201,7 +201,7 @@ export default {
console.error(e)
this.showError = true
this.errorMsg = e.message
// this.isNoData = true
this.isNoData = false
}).finally(() => {
this.loading = false
})

View File

@@ -161,10 +161,9 @@ export default {
this.errorMsg = res.message
}
}).catch(e => {
console.error(e)
this.showError = true
this.errorMsg = e.message
// this.isNoData = true
this.isNoData = false
}).finally(() => {
this.loading = false
})

View File

@@ -71,7 +71,7 @@
<el-tab-pane :label="$t('network.providers')" :name="0">
<div class="body__apps" :class="{'body__apps-no-grid': providerOptions.length === 0}">
<loading :loading="loadingBody"></loading>
<chart-no-data v-if="providerOptions.length === 0 && !loadingBody"></chart-no-data>
<chart-no-data v-if="providerOptions.length === 0 && !loadingBody" test-id="noData"></chart-no-data>
<div class="body__app" v-else :class="{'provide-show': app.provideShow}" v-for="(app, index) in providerOptions" :key="index" @click="appCheckedChange(app, 0)" :test-id="`provide${index}`">
<div class="body__app-content">
<div class="body__app-left">
@@ -463,7 +463,7 @@ export default {
params.type = 'overviewProvide'
axios.get(api.dict, { params: params }).then(res => {
res = res.data
if (res.code === 200) {
if (res.code === 200 && res.data.list) {
res.data.list = res.data.list.filter(l => !this.appData.some(pd => pd.type === 'provider' && pd.name === l.value))
this.pageObj.pages = res.data.pages
res.data.list.forEach(t => {

View File

@@ -1,6 +1,6 @@
<template>
<div class="ddos-detection">
<chart-no-data v-if="isNoData"></chart-no-data>
<chart-no-data v-if="isNoData" test-id="noData"></chart-no-data>
<chart-error info v-if="showError" :content="errorMsg" />
<div class="ddos-detection-title">

View File

@@ -82,7 +82,7 @@
</div>
</template>
<template v-else-if="item.prop === 'inbound'">
<div class="data-total-value">{{unitConvert(scope.row.inboundPacketsRate, unitTypes.bps).join(' ')}}</div>
<div class="data-total-value" :test-id="`inbound-packet-${scope.row.appSubcategory}`">{{unitConvert(scope.row.inboundPacketsRate, unitTypes.bps).join(' ')}}</div>
<div class="data-trend">
<div v-if="scope.row.inboundBytesRateChainRatio > 0" class="data-total-trend data-total-trend-red">
<i class="cn-icon-rise1 cn-icon"></i>&nbsp;

View File

@@ -54,7 +54,7 @@
</template>
<template v-slot:empty>
<div class="table-no-data" v-show="isNoData">
<div class="table-no-data__title">{{ $t('npm.noData') }}</div>
<div class="table-no-data__title" test-id="noData">{{ $t('npm.noData') }}</div>
</div>
</template>
</el-table>

View File

@@ -17,6 +17,7 @@ import { api } from '@/utils/api'
import chartMixin from '@/views/charts2/chart-mixin'
import ChartError from '@/components/common/Error'
import axios from 'axios'
export default {
name: 'NpmEventsHeader',
components: { ChartError },

View File

@@ -40,7 +40,7 @@
<svg class="icon" aria-hidden="true">
<use xlink:href="#cn-icon-good"></use>
</svg>
<div class="table-no-data__title">{{ $t('npm.thereNoEvents') }}</div>
<div class="table-no-data__title" test-id="noData">{{ $t('npm.thereNoEvents') }}</div>
</div>
</template>
</el-table>
@@ -125,13 +125,13 @@ export default {
}
})
this.tableData = res.data.result
console.log('打印tableData', this.tableData)
} else {
// this.isNoData = true
this.isNoData = false
this.showError = true
this.errorMsg = res.message
}
}).catch(error => {
this.isNoData = false
this.showError = true
this.errorMsg = error.message
}).finally(() => {

View File

@@ -1,14 +1,11 @@
import linkBlock from '@/views/charts2/charts/linkMonitor/LinkBlock'
import { mount } from '@vue/test-utils'
import axios from 'axios'
import { mockData, linkInfoData } from './MockData/LinkBlock'
const mockGet1 = mockData.common.data1
const mockGet2 = mockData.common.data2
const mockGet1 = {
data: { status: 200, code: 200, queryKey: '549b4c3bcabf0feee193b834671879de', success: true, message: null, statistics: { elapsed: 3, rows_read: 11480, bytes_read: 459200, result_size: 1214, result_rows: 21 }, job: null, formatType: 'json', meta: [{ name: 'link_id', type: 'string', category: 'Dimension' }, { name: 'egress_bytes', type: 'long', category: 'Metric' }, { name: 'ingress_bytes', type: 'long', category: 'Metric' }], data: { resultType: 'table', result: [{ linkId: '257', egressBytes: '0', egressBitsRate: 0, ingressBytes: '493739879', ingressBitsRate: 1097199.76 }, { linkId: '256', egressBytes: '4147998874', egressBitsRate: 9217775.28, ingressBytes: '0', ingressBitsRate: 0 }, { linkId: '1024', egressBytes: '4229808296', egressBitsRate: 9399574, ingressBytes: '0', ingressBitsRate: 0 }, { linkId: '1793', egressBytes: '0', egressBitsRate: 0, ingressBytes: '604840505', ingressBitsRate: 1344090 }, { linkId: '2817', egressBytes: '0', egressBitsRate: 0, ingressBytes: '430811638', ingressBitsRate: 957359.2 }, { linkId: '0', egressBytes: '819878366014', egressBitsRate: 1821951924.48, ingressBytes: '140774357362', ingressBitsRate: 312831905.28 }, { linkId: '1281', egressBytes: '0', egressBitsRate: 0, ingressBytes: '544675122', ingressBitsRate: 1210389.12 }, { linkId: '2049', egressBytes: '0', egressBitsRate: 0, ingressBytes: '711346274', ingressBitsRate: 1580769.52 }, { linkId: '1536', egressBytes: '4195896971', egressBitsRate: 9324215.52, ingressBytes: '0', ingressBitsRate: 0 }, { linkId: '2305', egressBytes: '0', egressBitsRate: 0, ingressBytes: '524865003', ingressBitsRate: 1166366.64 }, { linkId: '1792', egressBytes: '4145790227', egressBitsRate: 9212867.2, ingressBytes: '0', ingressBitsRate: 0 }, { linkId: '1025', egressBytes: '0', egressBitsRate: 0, ingressBytes: '492227445', ingressBitsRate: 1093838.8 }, { linkId: '2816', egressBytes: '4000074817', egressBitsRate: 8889055.12, ingressBytes: '0', ingressBitsRate: 0 }, { linkId: '513', egressBytes: '0', egressBitsRate: 0, ingressBytes: '1444814826', ingressBitsRate: 3210699.6 }, { linkId: '768', egressBytes: '4370006099', egressBitsRate: 9711124.64, ingressBytes: '0', ingressBitsRate: 0 }, { linkId: '512', egressBytes: '3894190397', egressBitsRate: 8653756.4, ingressBytes: '0', ingressBitsRate: 0 }, { linkId: '769', egressBytes: '0', egressBitsRate: 0, ingressBytes: '1877580759', ingressBitsRate: 4172401.68 }, { linkId: '2304', egressBytes: '3767761711', egressBitsRate: 8372803.84, ingressBytes: '0', ingressBitsRate: 0 }, { linkId: '1537', egressBytes: '0', egressBitsRate: 0, ingressBytes: '367986916', ingressBitsRate: 817748.72 }, { linkId: '1280', egressBytes: '4040444894', egressBitsRate: 8978766.4, ingressBytes: '0', ingressBitsRate: 0 }, { linkId: '2048', egressBytes: '4682050724', egressBitsRate: 10404557.2, ingressBytes: '0', ingressBitsRate: 0 }] }, originalUrl: 'http://192.168.44.55:9999?query=SELECT%20arrayJoin%28splitByChar%28%27_%27%2C%20concat%28toString%28common_egress_link_id%29%2C%20%27_%27%2C%20toString%28common_ingress_link_id%29%29%29%29%20AS%20link_id%2CSUM%28IF%28toString%28common_egress_link_id%29%20%3D%20link_id%2C%20traffic_outbound_byte%2C%200%29%29%20AS%20egress_bytes%2CSUM%28IF%28toString%28common_ingress_link_id%29%20%3D%20link_id%2C%20traffic_inbound_byte%2C%200%29%29%20AS%20ingress_bytes%20FROM%20metric_link%20WHERE%20stat_time%20%3E%3D%201675303793%20AND%20stat_time%20%3C%201675307393%20GROUP%20BY%20link_id&format=json&option=real-time', msg: 'OK' }
}
const mockGet2 = {
data: { status: 200, code: 200, queryKey: 'ee2e820b1275748167cdee82b2b4ea40', success: true, message: null, statistics: { elapsed: 3, rows_read: 11480, bytes_read: 618564, result_size: 1053, result_rows: 10 }, job: null, formatType: 'json', meta: [{ name: 'egress_link_direction', type: 'string', category: 'Dimension' }, { name: 'ingress_link_direction', type: 'string', category: 'Dimension' }, { name: 'egress_bytes', type: 'long', category: 'Metric' }, { name: 'ingress_bytes', type: 'long', category: 'Metric' }], data: { resultType: 'table', result: [{ egressLinkDirection: '太原', ingressLinkDirection: '西宁', egressBytes: '2407509269', egressBitsRate: 5350020.56, ingressBytes: '193368911', ingressBitsRate: 429708.72 }, { egressLinkDirection: '西安', ingressLinkDirection: '西安', egressBytes: '3609358392', egressBitsRate: 8020796.4, ingressBytes: '345009143', ingressBitsRate: 766686.96 }, { egressLinkDirection: '西宁', ingressLinkDirection: '西安', egressBytes: '1273508499', egressBitsRate: 2830018.88, ingressBytes: '122646511', ingressBitsRate: 272547.84 }, { egressLinkDirection: '太原', ingressLinkDirection: '太原', egressBytes: '14840136119', egressBitsRate: 32978080.24, ingressBytes: '3386427658', ingressBitsRate: 7525394.8 }, { egressLinkDirection: '西安', ingressLinkDirection: '太原', egressBytes: '7070361369', egressBitsRate: 15711914.16, ingressBytes: '1853445429', ingressBitsRate: 4118767.6 }, { egressLinkDirection: '西宁', ingressLinkDirection: '太原', egressBytes: '2619231460', egressBitsRate: 5820514.32, ingressBytes: '291561196', ingressBitsRate: 647913.76 }, { egressLinkDirection: '', ingressLinkDirection: '', egressBytes: '409939183007', egressBitsRate: 910975962.24, ingressBytes: '70387178681', ingressBitsRate: 156415952.64 }, { egressLinkDirection: '太原', ingressLinkDirection: '西安', egressBytes: '7808050741', egressBitsRate: 17351223.84, ingressBytes: '1001570985', ingressBitsRate: 2225713.28 }, { egressLinkDirection: '西宁', ingressLinkDirection: '西宁', egressBytes: '337068337', egressBitsRate: 749040.72, ingressBytes: '165230290', ingressBitsRate: 367178.4 }, { egressLinkDirection: '西安', ingressLinkDirection: '西宁', egressBytes: '1508798824', egressBitsRate: 3352886.24, ingressBytes: '133628244', ingressBitsRate: 296951.68 }] }, originalUrl: 'http://192.168.44.55:9999?query=SELECT%20egress_link_direction%20AS%20egress_link_direction%2C%20ingress_link_direction%20AS%20ingress_link_direction%2C%20SUM%28traffic_outbound_byte%29%20AS%20egress_bytes%2C%20SUM%28traffic_inbound_byte%29%20AS%20ingress_bytes%20FROM%20metric_link%20WHERE%20stat_time%20%3E%3D%201675303793%20AND%20stat_time%20%3C%201675307393%20GROUP%20BY%20egress_link_direction%2C%20ingress_link_direction&format=json&option=real-time', msg: 'OK' }
}
const linkInfoData = [{ originalLinkId: '256', linkId: 'Hundredgige1', direction: 'egress', nextHop: '西安', bandwidth: 100000000000 }, { originalLinkId: '257', linkId: 'Hundredgige1', direction: 'ingress', nextHop: '西安', bandwidth: 100000000000 }, { originalLinkId: '512', linkId: 'Hundredgige2', direction: 'egress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '513', linkId: 'Hundredgige2', direction: 'ingress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '768', linkId: 'Hundredgige3', direction: 'egress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '769', linkId: 'Hundredgige3', direction: 'ingress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '1024', linkId: 'Hundredgige4', direction: 'egress', nextHop: '西宁', bandwidth: 100000000000 }, { originalLinkId: '1025', linkId: 'Hundredgige4', direction: 'ingress', nextHop: '西宁', bandwidth: 100000000000 }, { originalLinkId: '1280', linkId: 'Hundredgige5', direction: 'egress', nextHop: '西安', bandwidth: 100000000000 }, { originalLinkId: '1281', linkId: 'Hundredgige5', direction: 'ingress', nextHop: '西安', bandwidth: 100000000000 }, { originalLinkId: '1536', linkId: 'Hundredgige6', direction: 'egress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '1537', linkId: 'Hundredgige6', direction: 'ingress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '1792', linkId: 'Hundredgige7', direction: 'egress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '1793', linkId: 'Hundredgige7', direction: 'ingress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '2048', linkId: 'Hundredgige8', direction: 'egress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '2049', linkId: 'Hundredgige8', direction: 'ingress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '2304', linkId: 'Hundredgige9', direction: 'egress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '2305', linkId: 'Hundredgige9', direction: 'ingress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '2816', linkId: 'Hundredgige10', direction: 'egress', nextHop: '西安', bandwidth: 100000000000 }, { originalLinkId: '2817', linkId: 'Hundredgige10', direction: 'ingress', nextHop: '西安', bandwidth: 100000000000 }]
const linkInfo = JSON.stringify(linkInfoData)
const timeFilter = {
dateRangeValue: -1,
@@ -20,25 +17,26 @@ var wrapper = null
/**
* 进行axios请求并挂载vue实例
* @param list
*
*/
function axiosPostAndMounted (list) {
function axiosPostAndMounted (list1, list2) {
require('vue-router').useRoute.mockReturnValue({ query: {} })
const data = list || mockGet1
const data1 = list1 || mockGet1
const data2 = list2 || mockGet2
// 模拟axios返回数据
axios.get.mockImplementation(url => {
switch (url) {
case '/interface/link/overview/analysis':
return Promise.resolve(data)
return Promise.resolve(data1)
case '/interface/link/overview/nextHopAnalysis':
return Promise.resolve(mockGet2)
return Promise.resolve(data2)
}
})
// 模拟localStorage获取数据
// eslint-disable-next-line no-proto
jest.spyOn(localStorage.__proto__, 'getItem').mockImplementation(key => linkInfo)
jest.spyOn(localStorage.__proto__, 'getItem').mockImplementation(() => linkInfo)
// 加载vue组件获得实例
wrapper = mount(linkBlock, {
@@ -86,44 +84,79 @@ describe('views/charts2/charts/linkMonitor/LinkBlock.vue测试', () => {
resolve()
}, 200))
})
test('鼠标移动到链路蜂窝图第一个测试total显示', async () => {
// 以"Hundredgige3"为例对应出方向linkId为768对应出方向流量为9711124.64
// 对应入方向linkId为769对应入方向流量为4172401.68修改流量测试total
const list = JSON.parse(JSON.stringify(mockGet1))
list.data.data.result[14].egressBitsRate = 9000000.00
list.data.data.result[16].ingressBitsRate = 4000000.00
test('链路蜂窝图和下一跳蜂窝图均无数据', async () => {
const list1 = mockData.empty.data1
const list2 = mockData.empty.data2
axiosPostAndMounted(list)
axiosPostAndMounted(list1, list2)
// 延迟等待渲染。使用wrapper.vm.$nextTick有时不管用例如组件中使用了setTimeout的时候
await new Promise(resolve => setTimeout(() => {
const linkBlockTotal0 = wrapper.get('[test-id="linkBlockTotal0"]')
const linkBlockEgressUsage0 = wrapper.get('[test-id="linkBlockEgressUsage0"]')
const linkBlockIngressUsage0 = wrapper.get('[test-id="linkBlockIngressUsage0"]')
const linkBlockNoData = wrapper.get('[test-id="linkBlockNoData"]')
const nextHpNoData = wrapper.get('[test-id="nextHpNoData"]')
expect(linkBlockTotal0.text()).toBe('13 Mbps')
expect(linkBlockEgressUsage0.text()).toBe('< 0.01%')
expect(linkBlockIngressUsage0.text()).toBe('< 0.01%')
expect(linkBlockNoData.text()).toBe('npm.noData')
expect(nextHpNoData.text()).toBe('npm.noData')
resolve()
}, 200))
})
test('鼠标移动到链路蜂窝图第一个,测试出入流量占比', async () => {
// 以"Hundredgige3"为例修改其出入流量为100000000000测试上行流量占比为100%下行占比为0%的情况
const list = JSON.parse(JSON.stringify(mockGet1))
list.data.data.result[14].egressBitsRate = 100000000000.00
list.data.data.result[16].ingressBitsRate = 0
test('链路蜂窝图上行流量大数值', async () => {
const list1 = mockData.boundary.data1
axiosPostAndMounted(list)
axiosPostAndMounted(list1)
// 延迟等待渲染。使用wrapper.vm.$nextTick有时不管用例如组件中使用了setTimeout的时候
await new Promise(resolve => setTimeout(() => {
const linkBlockTotal0 = wrapper.get('[test-id="linkBlockTotal0"]')
const linkBlockEgressUsage0 = wrapper.get('[test-id="linkBlockEgressUsage0"]')
const linkBlockIngressUsage0 = wrapper.get('[test-id="linkBlockIngressUsage0"]')
const linkBlockEgressUsage1 = wrapper.get('[test-id="linkBlockEgressUsage1"]')
const linkBlockEgressUsage2 = wrapper.get('[test-id="linkBlockEgressUsage2"]')
const linkBlockEgressUsage3 = wrapper.get('[test-id="linkBlockEgressUsage3"]')
const linkBlockEgressUsage4 = wrapper.get('[test-id="linkBlockEgressUsage4"]')
const linkBlockEgressUsage5 = wrapper.get('[test-id="linkBlockEgressUsage5"]')
const linkBlockEgressUsage6 = wrapper.get('[test-id="linkBlockEgressUsage6"]')
const linkBlockEgressUsage7 = wrapper.get('[test-id="linkBlockEgressUsage7"]')
const linkBlockEgressUsage8 = wrapper.get('[test-id="linkBlockEgressUsage8"]')
const linkBlockEgressUsage9 = wrapper.get('[test-id="linkBlockEgressUsage9"]')
// 超大流量时total显示
expect(linkBlockTotal0.text()).toBe('100 Gbps')
// 超大上行流量,上行占比情况
expect(linkBlockEgressUsage0.text()).toBe('100.00%')
expect(linkBlockIngressUsage0.text()).toBe('0%')
expect(linkBlockEgressUsage1.text()).toBe('100.00%')
expect(linkBlockEgressUsage2.text()).toBe('100.00%')
expect(linkBlockEgressUsage3.text()).toBe('100.00%')
expect(linkBlockEgressUsage4.text()).toBe('100.00%')
expect(linkBlockEgressUsage5.text()).toBe('100.00%')
expect(linkBlockEgressUsage6.text()).toBe('100.00%')
expect(linkBlockEgressUsage7.text()).toBe('100.00%')
expect(linkBlockEgressUsage8.text()).toBe('100.00%')
expect(linkBlockEgressUsage9.text()).toBe('100.00%')
resolve()
}, 200))
})
test('下一跳蜂窝图下行流量大数值', async () => {
const list1 = mockData.common.data1
const list2 = mockData.boundary.data2
axiosPostAndMounted(list1, list2)
await new Promise(resolve => setTimeout(() => {
const nextHopTotal0 = wrapper.get('[test-id="nextHopTotal0"]')
const nextHopIngressUsage0 = wrapper.get('[test-id="nextHopIngressUsage0"]')
const nextHopIngressUsage1 = wrapper.get('[test-id="nextHopIngressUsage1"]')
const nextHopIngressUsage2 = wrapper.get('[test-id="nextHopIngressUsage2"]')
const nextHopEgressUsage0 = wrapper.get('[test-id="nextHopEgressUsage0"]')
const nextHopEgressUsage1 = wrapper.get('[test-id="nextHopEgressUsage1"]')
const nextHopEgressUsage2 = wrapper.get('[test-id="nextHopEgressUsage2"]')
// 超大流量时total显示
expect(nextHopTotal0.text()).toBe('30 Tbps')
// 超大上行流量,上行、下行占比情况
expect(nextHopEgressUsage0.text()).toBe('0%')
expect(nextHopEgressUsage1.text()).toBe('0%')
expect(nextHopEgressUsage2.text()).toBe('0%')
expect(nextHopIngressUsage0.text()).toBe('100.00%')
expect(nextHopIngressUsage1.text()).toBe('100.00%')
expect(nextHopIngressUsage2.text()).toBe('100.00%')
resolve()
}, 200))
})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,240 @@
export const mockData = {
common: {
data1: {
data: { status: 200, code: 200, queryKey: '549b4c3bcabf0feee193b834671879de', success: true, message: null, statistics: { elapsed: 3, rows_read: 11480, bytes_read: 459200, result_size: 1214, result_rows: 21 }, job: null, formatType: 'json', meta: [{ name: 'link_id', type: 'string', category: 'Dimension' }, { name: 'egress_bytes', type: 'long', category: 'Metric' }, { name: 'ingress_bytes', type: 'long', category: 'Metric' }], data: { resultType: 'table', result: [{ linkId: '257', egressBytes: '0', egressBitsRate: 0, ingressBytes: '493739879', ingressBitsRate: 1097199.76 }, { linkId: '256', egressBytes: '4147998874', egressBitsRate: 9217775.28, ingressBytes: '0', ingressBitsRate: 0 }, { linkId: '1024', egressBytes: '4229808296', egressBitsRate: 9399574, ingressBytes: '0', ingressBitsRate: 0 }, { linkId: '1793', egressBytes: '0', egressBitsRate: 0, ingressBytes: '604840505', ingressBitsRate: 1344090 }, { linkId: '2817', egressBytes: '0', egressBitsRate: 0, ingressBytes: '430811638', ingressBitsRate: 957359.2 }, { linkId: '0', egressBytes: '819878366014', egressBitsRate: 1821951924.48, ingressBytes: '140774357362', ingressBitsRate: 312831905.28 }, { linkId: '1281', egressBytes: '0', egressBitsRate: 0, ingressBytes: '544675122', ingressBitsRate: 1210389.12 }, { linkId: '2049', egressBytes: '0', egressBitsRate: 0, ingressBytes: '711346274', ingressBitsRate: 1580769.52 }, { linkId: '1536', egressBytes: '4195896971', egressBitsRate: 9324215.52, ingressBytes: '0', ingressBitsRate: 0 }, { linkId: '2305', egressBytes: '0', egressBitsRate: 0, ingressBytes: '524865003', ingressBitsRate: 1166366.64 }, { linkId: '1792', egressBytes: '4145790227', egressBitsRate: 9212867.2, ingressBytes: '0', ingressBitsRate: 0 }, { linkId: '1025', egressBytes: '0', egressBitsRate: 0, ingressBytes: '492227445', ingressBitsRate: 1093838.8 }, { linkId: '2816', egressBytes: '4000074817', egressBitsRate: 8889055.12, ingressBytes: '0', ingressBitsRate: 0 }, { linkId: '513', egressBytes: '0', egressBitsRate: 0, ingressBytes: '1444814826', ingressBitsRate: 3210699.6 }, { linkId: '768', egressBytes: '4370006099', egressBitsRate: 9711124.64, ingressBytes: '0', ingressBitsRate: 0 }, { linkId: '512', egressBytes: '3894190397', egressBitsRate: 8653756.4, ingressBytes: '0', ingressBitsRate: 0 }, { linkId: '769', egressBytes: '0', egressBitsRate: 0, ingressBytes: '1877580759', ingressBitsRate: 4172401.68 }, { linkId: '2304', egressBytes: '3767761711', egressBitsRate: 8372803.84, ingressBytes: '0', ingressBitsRate: 0 }, { linkId: '1537', egressBytes: '0', egressBitsRate: 0, ingressBytes: '367986916', ingressBitsRate: 817748.72 }, { linkId: '1280', egressBytes: '4040444894', egressBitsRate: 8978766.4, ingressBytes: '0', ingressBitsRate: 0 }, { linkId: '2048', egressBytes: '4682050724', egressBitsRate: 10404557.2, ingressBytes: '0', ingressBitsRate: 0 }] }, originalUrl: 'http://192.168.44.55:9999?query=SELECT%20arrayJoin%28splitByChar%28%27_%27%2C%20concat%28toString%28common_egress_link_id%29%2C%20%27_%27%2C%20toString%28common_ingress_link_id%29%29%29%29%20AS%20link_id%2CSUM%28IF%28toString%28common_egress_link_id%29%20%3D%20link_id%2C%20traffic_outbound_byte%2C%200%29%29%20AS%20egress_bytes%2CSUM%28IF%28toString%28common_ingress_link_id%29%20%3D%20link_id%2C%20traffic_inbound_byte%2C%200%29%29%20AS%20ingress_bytes%20FROM%20metric_link%20WHERE%20stat_time%20%3E%3D%201675303793%20AND%20stat_time%20%3C%201675307393%20GROUP%20BY%20link_id&format=json&option=real-time', msg: 'OK' }
},
data2: {
data: { status: 200, code: 200, queryKey: 'ee2e820b1275748167cdee82b2b4ea40', success: true, message: null, statistics: { elapsed: 3, rows_read: 11480, bytes_read: 618564, result_size: 1053, result_rows: 10 }, job: null, formatType: 'json', meta: [{ name: 'egress_link_direction', type: 'string', category: 'Dimension' }, { name: 'ingress_link_direction', type: 'string', category: 'Dimension' }, { name: 'egress_bytes', type: 'long', category: 'Metric' }, { name: 'ingress_bytes', type: 'long', category: 'Metric' }], data: { resultType: 'table', result: [{ egressLinkDirection: '太原', ingressLinkDirection: '西宁', egressBytes: '2407509269', egressBitsRate: 5350020.56, ingressBytes: '193368911', ingressBitsRate: 429708.72 }, { egressLinkDirection: '西安', ingressLinkDirection: '西安', egressBytes: '3609358392', egressBitsRate: 8020796.4, ingressBytes: '345009143', ingressBitsRate: 766686.96 }, { egressLinkDirection: '西宁', ingressLinkDirection: '西安', egressBytes: '1273508499', egressBitsRate: 2830018.88, ingressBytes: '122646511', ingressBitsRate: 272547.84 }, { egressLinkDirection: '太原', ingressLinkDirection: '太原', egressBytes: '14840136119', egressBitsRate: 32978080.24, ingressBytes: '3386427658', ingressBitsRate: 7525394.8 }, { egressLinkDirection: '西安', ingressLinkDirection: '太原', egressBytes: '7070361369', egressBitsRate: 15711914.16, ingressBytes: '1853445429', ingressBitsRate: 4118767.6 }, { egressLinkDirection: '西宁', ingressLinkDirection: '太原', egressBytes: '2619231460', egressBitsRate: 5820514.32, ingressBytes: '291561196', ingressBitsRate: 647913.76 }, { egressLinkDirection: '', ingressLinkDirection: '', egressBytes: '409939183007', egressBitsRate: 910975962.24, ingressBytes: '70387178681', ingressBitsRate: 156415952.64 }, { egressLinkDirection: '太原', ingressLinkDirection: '西安', egressBytes: '7808050741', egressBitsRate: 17351223.84, ingressBytes: '1001570985', ingressBitsRate: 2225713.28 }, { egressLinkDirection: '西宁', ingressLinkDirection: '西宁', egressBytes: '337068337', egressBitsRate: 749040.72, ingressBytes: '165230290', ingressBitsRate: 367178.4 }, { egressLinkDirection: '西安', ingressLinkDirection: '西宁', egressBytes: '1508798824', egressBitsRate: 3352886.24, ingressBytes: '133628244', ingressBitsRate: 296951.68 }] }, originalUrl: 'http://192.168.44.55:9999?query=SELECT%20egress_link_direction%20AS%20egress_link_direction%2C%20ingress_link_direction%20AS%20ingress_link_direction%2C%20SUM%28traffic_outbound_byte%29%20AS%20egress_bytes%2C%20SUM%28traffic_inbound_byte%29%20AS%20ingress_bytes%20FROM%20metric_link%20WHERE%20stat_time%20%3E%3D%201675303793%20AND%20stat_time%20%3C%201675307393%20GROUP%20BY%20egress_link_direction%2C%20ingress_link_direction&format=json&option=real-time', msg: 'OK' }
}
},
empty: {
data1: {
data: { status: 200, code: 200, data: { resultType: 'table', result: [] }, msg: 'OK' }
},
data2: {
data: { status: 200, code: 200, data: { resultType: 'table', result: [] }, msg: 'OK' }
}
},
boundary: {
data1: {
data: {
status: 200,
code: 200,
queryKey: '549b4c3bcabf0feee193b834671879de',
data: {
result: [
{
linkId: '257',
egressBytes: '0',
egressBitsRate: 0,
ingressBytes: '493739879',
ingressBitsRate: 0
}, {
linkId: '256',
egressBytes: '4147998874',
egressBitsRate: 100000000000.00,
ingressBytes: '0',
ingressBitsRate: 0
}, {
linkId: '1024',
egressBytes: '4229808296',
egressBitsRate: 100000000000.00,
ingressBytes: '0',
ingressBitsRate: 0
}, {
linkId: '1793',
egressBytes: '0',
egressBitsRate: 0,
ingressBytes: '604840505',
ingressBitsRate: 0
}, {
linkId: '2817',
egressBytes: '0',
egressBitsRate: 0,
ingressBytes: '430811638',
ingressBitsRate: 0
}, {
linkId: '0',
egressBytes: '819878366014',
egressBitsRate: 1821951924.48,
ingressBytes: '140774357362',
ingressBitsRate: 312831905.28
}, {
linkId: '1281',
egressBytes: '0',
egressBitsRate: 0,
ingressBytes: '544675122',
ingressBitsRate: 0
}, {
linkId: '2049',
egressBytes: '0',
egressBitsRate: 0,
ingressBytes: '711346274',
ingressBitsRate: 0
}, {
linkId: '1536',
egressBytes: '4195896971',
egressBitsRate: 100000000000.00,
ingressBytes: '0',
ingressBitsRate: 0
}, {
linkId: '2305',
egressBytes: '0',
egressBitsRate: 0,
ingressBytes: '524865003',
ingressBitsRate: 0
}, {
linkId: '1792',
egressBytes: '4145790227',
egressBitsRate: 100000000000.00,
ingressBytes: '0',
ingressBitsRate: 0
}, {
linkId: '1025',
egressBytes: '0',
egressBitsRate: 0,
ingressBytes: '492227445',
ingressBitsRate: 0
}, {
linkId: '2816',
egressBytes: '4000074817',
egressBitsRate: 100000000000.00,
ingressBytes: '0',
ingressBitsRate: 0
}, {
linkId: '513',
egressBytes: '0',
egressBitsRate: 0,
ingressBytes: '1444814826',
ingressBitsRate: 0
}, {
linkId: '768',
egressBytes: '4370006099',
egressBitsRate: 100000000000.00,
ingressBytes: '0',
ingressBitsRate: 0
}, {
linkId: '512',
egressBytes: '3894190397',
egressBitsRate: 100000000000.00,
ingressBytes: '0',
ingressBitsRate: 0
}, {
linkId: '769',
egressBytes: '0',
egressBitsRate: 0,
ingressBytes: '1877580759',
ingressBitsRate: 0
}, {
linkId: '2304',
egressBytes: '3767761711',
egressBitsRate: 100000000000.00,
ingressBytes: '0',
ingressBitsRate: 0
}, {
linkId: '1537',
egressBytes: '0',
egressBitsRate: 0,
ingressBytes: '367986916',
ingressBitsRate: 0
}, {
linkId: '1280',
egressBytes: '4040444894',
egressBitsRate: 100000000000.00,
ingressBytes: '0',
ingressBitsRate: 0
}, {
linkId: '2048',
egressBytes: '4682050724',
egressBitsRate: 100000000000.00,
ingressBytes: '0',
ingressBitsRate: 0
}]
}
}
},
data2: {
data: {
status: 200,
code: 200,
data: {
resultType: 'table',
result: [{
egressLinkDirection: '太原',
ingressLinkDirection: '西宁',
egressBytes: '2407509269',
egressBitsRate: 0,
ingressBytes: '193368911',
ingressBitsRate: 10000000000000.00
}, {
egressLinkDirection: '西安',
ingressLinkDirection: '西安',
egressBytes: '3609358392',
egressBitsRate: 0,
ingressBytes: '345009143',
ingressBitsRate: 10000000000000.00
}, {
egressLinkDirection: '西宁',
ingressLinkDirection: '西安',
egressBytes: '1273508499',
egressBitsRate: 0,
ingressBytes: '122646511',
ingressBitsRate: 10000000000000.00
}, {
egressLinkDirection: '太原',
ingressLinkDirection: '太原',
egressBytes: '14840136119',
egressBitsRate: 0,
ingressBytes: '3386427658',
ingressBitsRate: 10000000000000.00
}, {
egressLinkDirection: '西安',
ingressLinkDirection: '太原',
egressBytes: '7070361369',
egressBitsRate: 0,
ingressBytes: '1853445429',
ingressBitsRate: 10000000000000.00
}, {
egressLinkDirection: '西宁',
ingressLinkDirection: '太原',
egressBytes: '2619231460',
egressBitsRate: 0,
ingressBytes: '291561196',
ingressBitsRate: 10000000000000.00
}, {
egressLinkDirection: '',
ingressLinkDirection: '',
egressBytes: '409939183007',
egressBitsRate: 0,
ingressBytes: '70387178681',
ingressBitsRate: 10000000000000.00
}, {
egressLinkDirection: '太原',
ingressLinkDirection: '西安',
egressBytes: '7808050741',
egressBitsRate: 0,
ingressBytes: '1001570985',
ingressBitsRate: 10000000000000.00
}, {
egressLinkDirection: '西宁',
ingressLinkDirection: '西宁',
egressBytes: '337068337',
egressBitsRate: 0,
ingressBytes: '165230290',
ingressBitsRate: 10000000000000.00
}, {
egressLinkDirection: '西安',
ingressLinkDirection: '西宁',
egressBytes: '1508798824',
egressBitsRate: 0,
ingressBytes: '133628244',
ingressBitsRate: 10000000000000.00
}]
},
msg: 'OK'
}
}
}
}
export const linkInfoData = [{ originalLinkId: '256', linkId: 'Hundredgige1', direction: 'egress', nextHop: '西安', bandwidth: 100000000000 }, { originalLinkId: '257', linkId: 'Hundredgige1', direction: 'ingress', nextHop: '西安', bandwidth: 100000000000 }, { originalLinkId: '512', linkId: 'Hundredgige2', direction: 'egress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '513', linkId: 'Hundredgige2', direction: 'ingress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '768', linkId: 'Hundredgige3', direction: 'egress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '769', linkId: 'Hundredgige3', direction: 'ingress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '1024', linkId: 'Hundredgige4', direction: 'egress', nextHop: '西宁', bandwidth: 100000000000 }, { originalLinkId: '1025', linkId: 'Hundredgige4', direction: 'ingress', nextHop: '西宁', bandwidth: 100000000000 }, { originalLinkId: '1280', linkId: 'Hundredgige5', direction: 'egress', nextHop: '西安', bandwidth: 100000000000 }, { originalLinkId: '1281', linkId: 'Hundredgige5', direction: 'ingress', nextHop: '西安', bandwidth: 100000000000 }, { originalLinkId: '1536', linkId: 'Hundredgige6', direction: 'egress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '1537', linkId: 'Hundredgige6', direction: 'ingress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '1792', linkId: 'Hundredgige7', direction: 'egress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '1793', linkId: 'Hundredgige7', direction: 'ingress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '2048', linkId: 'Hundredgige8', direction: 'egress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '2049', linkId: 'Hundredgige8', direction: 'ingress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '2304', linkId: 'Hundredgige9', direction: 'egress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '2305', linkId: 'Hundredgige9', direction: 'ingress', nextHop: '太原', bandwidth: 100000000000 }, { originalLinkId: '2816', linkId: 'Hundredgige10', direction: 'egress', nextHop: '西安', bandwidth: 100000000000 }, { originalLinkId: '2817', linkId: 'Hundredgige10', direction: 'ingress', nextHop: '西安', bandwidth: 100000000000 }]

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,389 @@
export const mockData = {
common: {
data1: {
data: {
status: 200,
code: 200,
queryKey: '87649896d5b7547a0128eb47c2d40853',
success: true,
message: null,
statistics: {
elapsed: 4,
rows_read: 1033063,
bytes_read: 8618120,
result_size: 13807,
result_rows: 101
},
job: null,
formatType: 'json',
meta: [
{
name: 'stat_time',
type: 'long',
category: 'Dimension'
}, {
name: 'egress_bytes',
type: 'long',
category: 'Metric'
}, {
name: 'ingress_bytes',
type: 'long',
category: 'Metric'
}, {
name: 'egress_pkt',
type: 'long',
category: 'Metric'
}, {
name: 'ingress_pkt',
type: 'long',
category: 'Metric'
}, {
name: 'bytes_total',
type: 'long',
category: 'Metric'
}, {
name: 'packets_total',
type: 'long',
category: 'Metric'
}],
data: {
resultType: 'object',
result: [
{
type: 'bytes',
ingressBitsRate: {
values: [['1675388124', '0'], ['1675388160', '4253144'], ['1675388196', '470709.36'], ['1675388232', '0'], ['1675388268', '148192.24'], ['1675388304', '0'], ['1675388340', '577072.48'], ['1675388376', '160431.12'], ['1675388412', '0'], ['1675388448', '1639602.64'], ['1675388484', '0'], ['1675388520', '2074017.36'], ['1675388556', '798924.64'], ['1675388592', '0'], ['1675388628', '884606'], ['1675388664', '0'], ['1675388700', '1373220.48'], ['1675388736', '21305.36'], ['1675388772', '0'], ['1675388808', '1398940.24'], ['1675388844', '0'], ['1675388880', '4474519.52'], ['1675388916', '383473.12'], ['1675388952', '0'], ['1675388988', '582813.36'], ['1675389024', '0'], ['1675389060', '3545078.24'], ['1675389096', '766672'], ['1675389132', '0'], ['1675389168', '2877694'], ['1675389204', '0'], ['1675389240', '2195562.48'], ['1675389276', '2268681.12'], ['1675389312', '0'], ['1675389348', '1438248.88'], ['1675389384', '0'], ['1675389420', '88914.24'], ['1675389456', '363776.24'], ['1675389492', '0'], ['1675389528', '103931.36'], ['1675389564', '0'], ['1675389600', '930861.12'], ['1675389636', '473982.48'], ['1675389672', '0'], ['1675389708', '210004.88'], ['1675389744', '0'], ['1675389780', '764367.52'], ['1675389816', '236745.52'], ['1675389852', '0'], ['1675389888', '199598'], ['1675389924', '0'], ['1675389960', '385563.36'], ['1675389996', '353556.64'], ['1675390032', '0'], ['1675390068', '380246.48'], ['1675390104', '0'], ['1675390140', '456284'], ['1675390176', '2560143.76'], ['1675390212', '0'], ['1675390248', '3806779.36'], ['1675390284', '0'], ['1675390320', '382829.52'], ['1675390356', '225432.48'], ['1675390392', '0'], ['1675390428', '1024283.52'], ['1675390464', '0'], ['1675390500', '494194.88'], ['1675390536', '718094.88'], ['1675390572', '0'], ['1675390608', '373146.64'], ['1675390644', '0'], ['1675390680', '101628.64'], ['1675390716', '977218'], ['1675390752', '0'], ['1675390788', '7263452.48'], ['1675390824', '0'], ['1675390860', '2613115.76'], ['1675390896', '2987862'], ['1675390932', '0'], ['1675390968', '1376989.36'], ['1675391004', '0'], ['1675391040', '2245663.12'], ['1675391076', '602240.64'], ['1675391112', '0'], ['1675391148', '437569.12'], ['1675391184', '0'], ['1675391220', '115680.88'], ['1675391256', '42582.24'], ['1675391292', '0'], ['1675391328', '42002'], ['1675391364', '0'], ['1675391400', '720716'], ['1675391436', '5382.88'], ['1675391472', '0'], ['1675391508', '169074.64'], ['1675391544', '0'], ['1675391580', '1214277.76'], ['1675391616', '1523679.76'], ['1675391652', '0'], ['1675391688', '6382256'], ['1675391724', '0']],
analysis: {
avg: '756870.4',
max: '7263452.48',
min: '0',
p95: '3545078.24'
}
},
totalBitsRate: {
values: [['1675388124', '0'], ['1675388160', '17581092.48'], ['1675388196', '9918148.64'], ['1675388232', '0'], ['1675388268', '13213336.64'], ['1675388304', '0'], ['1675388340', '41123655.76'], ['1675388376', '14569548.64'], ['1675388412', '0'], ['1675388448', '39157977.52'], ['1675388484', '0'], ['1675388520', '15875735.76'], ['1675388556', '10885102.24'], ['1675388592', '0'], ['1675388628', '8943487.12'], ['1675388664', '0'], ['1675388700', '18985121.76'], ['1675388736', '7659627.36'], ['1675388772', '0'], ['1675388808', '9288266.88'], ['1675388844', '0'], ['1675388880', '15999674.24'], ['1675388916', '16802700.48'], ['1675388952', '0'], ['1675388988', '17836499.52'], ['1675389024', '0'], ['1675389060', '22368492'], ['1675389096', '12570182.88'], ['1675389132', '0'], ['1675389168', '19977345.36'], ['1675389204', '0'], ['1675389240', '7747381.76'], ['1675389276', '29050230.64'], ['1675389312', '0'], ['1675389348', '5834855.36'], ['1675389384', '0'], ['1675389420', '22798420.24'], ['1675389456', '9061622.64'], ['1675389492', '0'], ['1675389528', '2391149.76'], ['1675389564', '0'], ['1675389600', '10752915.76'], ['1675389636', '72671214'], ['1675389672', '0'], ['1675389708', '23536865.76'], ['1675389744', '0'], ['1675389780', '6080925.76'], ['1675389816', '27096624.64'], ['1675389852', '0'], ['1675389888', '47355125.36'], ['1675389924', '0'], ['1675389960', '7525635.52'], ['1675389996', '12312211.76'], ['1675390032', '0'], ['1675390068', '9587065.36'], ['1675390104', '0'], ['1675390140', '7763073.36'], ['1675390176', '12692375.36'], ['1675390212', '0'], ['1675390248', '13007133.76'], ['1675390284', '0'], ['1675390320', '3241344.88'], ['1675390356', '13811041.12'], ['1675390392', '0'], ['1675390428', '38206391.36'], ['1675390464', '0'], ['1675390500', '5489114'], ['1675390536', '17855136.88'], ['1675390572', '0'], ['1675390608', '18409624.48'], ['1675390644', '0'], ['1675390680', '15132633.12'], ['1675390716', '19189583.52'], ['1675390752', '0'], ['1675390788', '16803327.36'], ['1675390824', '0'], ['1675390860', '19972804.88'], ['1675390896', '22541580.48'], ['1675390932', '0'], ['1675390968', '21671364.88'], ['1675391004', '0'], ['1675391040', '25293518.24'], ['1675391076', '34056467.52'], ['1675391112', '0'], ['1675391148', '13181229.76'], ['1675391184', '0'], ['1675391220', '12337126.88'], ['1675391256', '5989032.64'], ['1675391292', '0'], ['1675391328', '7393281.36'], ['1675391364', '0'], ['1675391400', '29175007.36'], ['1675391436', '17228925.76'], ['1675391472', '0'], ['1675391508', '7375468'], ['1675391544', '0'], ['1675391580', '16675685.76'], ['1675391616', '22908316'], ['1675391652', '0'], ['1675391688', '13867890.88'], ['1675391724', '0']],
analysis: {
avg: '10578267.2',
max: '72671214',
min: '0',
p95: '34056467.52'
}
},
egressBitsRate: {
values: [['1675388124', '0'], ['1675388160', '13327948.48'], ['1675388196', '9447439.36'], ['1675388232', '0'], ['1675388268', '13065144.48'], ['1675388304', '0'], ['1675388340', '40546583.36'], ['1675388376', '14409117.52'], ['1675388412', '0'], ['1675388448', '37518374.88'], ['1675388484', '0'], ['1675388520', '13801718.48'], ['1675388556', '10086177.52'], ['1675388592', '0'], ['1675388628', '8058881.12'], ['1675388664', '0'], ['1675388700', '17611901.36'], ['1675388736', '7638322'], ['1675388772', '0'], ['1675388808', '7889326.64'], ['1675388844', '0'], ['1675388880', '11525154.64'], ['1675388916', '16419227.36'], ['1675388952', '0'], ['1675388988', '17253686.24'], ['1675389024', '0'], ['1675389060', '18823413.76'], ['1675389096', '11803510.88'], ['1675389132', '0'], ['1675389168', '17099651.36'], ['1675389204', '0'], ['1675389240', '5551819.36'], ['1675389276', '26781549.52'], ['1675389312', '0'], ['1675389348', '4396606.48'], ['1675389384', '0'], ['1675389420', '22709506'], ['1675389456', '8697846.48'], ['1675389492', '0'], ['1675389528', '2287218.48'], ['1675389564', '0'], ['1675389600', '9822054.64'], ['1675389636', '72197231.52'], ['1675389672', '0'], ['1675389708', '23326860.88'], ['1675389744', '0'], ['1675389780', '5316558.24'], ['1675389816', '26859879.12'], ['1675389852', '0'], ['1675389888', '47155527.36'], ['1675389924', '0'], ['1675389960', '7140072.24'], ['1675389996', '11958655.12'], ['1675390032', '0'], ['1675390068', '9206818.88'], ['1675390104', '0'], ['1675390140', '7306789.36'], ['1675390176', '10132231.52'], ['1675390212', '0'], ['1675390248', '9200354.48'], ['1675390284', '0'], ['1675390320', '2858515.36'], ['1675390356', '13585608.64'], ['1675390392', '0'], ['1675390428', '37182107.76'], ['1675390464', '0'], ['1675390500', '4994919.12'], ['1675390536', '17137042'], ['1675390572', '0'], ['1675390608', '18036477.76'], ['1675390644', '0'], ['1675390680', '15031004.48'], ['1675390716', '18212365.52'], ['1675390752', '0'], ['1675390788', '9539874.88'], ['1675390824', '0'], ['1675390860', '17359689.12'], ['1675390896', '19553718.48'], ['1675390932', '0'], ['1675390968', '20294375.52'], ['1675391004', '0'], ['1675391040', '23047855.12'], ['1675391076', '33454226.88'], ['1675391112', '0'], ['1675391148', '12743660.64'], ['1675391184', '0'], ['1675391220', '12221446'], ['1675391256', '5946450.48'], ['1675391292', '0'], ['1675391328', '7351279.36'], ['1675391364', '0'], ['1675391400', '28454291.36'], ['1675391436', '17223542.88'], ['1675391472', '0'], ['1675391508', '7206393.36'], ['1675391544', '0'], ['1675391580', '15461408'], ['1675391616', '21384636.24'], ['1675391652', '0'], ['1675391688', '7485634.88'], ['1675391724', '0']],
analysis: {
avg: '9821396.8',
max: '72197231.52',
min: '0',
p95: '33454226.88'
}
}
},
{
type: 'packets',
ingressPacketsRate: {
values: [['1675388124', '0.00'], ['1675388160', '382.61'], ['1675388196', '44.67'], ['1675388232', '0.00'], ['1675388268', '23.64'], ['1675388304', '0.00'], ['1675388340', '53.75'], ['1675388376', '34.89'], ['1675388412', '0.00'], ['1675388448', '155.25'], ['1675388484', '0.00'], ['1675388520', '186.17'], ['1675388556', '77.81'], ['1675388592', '0.00'], ['1675388628', '84.75'], ['1675388664', '0.00'], ['1675388700', '140.39'], ['1675388736', '9.69'], ['1675388772', '0.00'], ['1675388808', '126.83'], ['1675388844', '0.00'], ['1675388880', '398.50'], ['1675388916', '94.92'], ['1675388952', '0.00'], ['1675388988', '57.33'], ['1675389024', '0.00'], ['1675389060', '326.89'], ['1675389096', '69.06'], ['1675389132', '0.00'], ['1675389168', '253.61'], ['1675389204', '0.00'], ['1675389240', '201.11'], ['1675389276', '203.14'], ['1675389312', '0.00'], ['1675389348', '126.33'], ['1675389384', '0.00'], ['1675389420', '13.86'], ['1675389456', '34.81'], ['1675389492', '0.00'], ['1675389528', '12.47'], ['1675389564', '0.00'], ['1675389600', '107.08'], ['1675389636', '54.39'], ['1675389672', '0.00'], ['1675389708', '24.42'], ['1675389744', '0.00'], ['1675389780', '67.47'], ['1675389816', '35.94'], ['1675389852', '0.00'], ['1675389888', '22.44'], ['1675389924', '0.00'], ['1675389960', '45.64'], ['1675389996', '32.81'], ['1675390032', '0.00'], ['1675390068', '37.72'], ['1675390104', '0.00'], ['1675390140', '43.69'], ['1675390176', '228.97'], ['1675390212', '0.00'], ['1675390248', '392.69'], ['1675390284', '0.00'], ['1675390320', '55.33'], ['1675390356', '47.44'], ['1675390392', '0.00'], ['1675390428', '106.06'], ['1675390464', '0.00'], ['1675390500', '47.58'], ['1675390536', '64.56'], ['1675390572', '0.00'], ['1675390608', '35.94'], ['1675390644', '0.00'], ['1675390680', '17.31'], ['1675390716', '95.47'], ['1675390752', '0.00'], ['1675390788', '638.00'], ['1675390824', '0.00'], ['1675390860', '239.11'], ['1675390896', '290.89'], ['1675390932', '0.00'], ['1675390968', '129.31'], ['1675391004', '0.00'], ['1675391040', '208.83'], ['1675391076', '65.31'], ['1675391112', '0.00'], ['1675391148', '42.17'], ['1675391184', '0.00'], ['1675391220', '17.94'], ['1675391256', '14.33'], ['1675391292', '0.00'], ['1675391328', '6.31'], ['1675391364', '0.00'], ['1675391400', '62.83'], ['1675391436', '2.53'], ['1675391472', '0.00'], ['1675391508', '37.06'], ['1675391544', '0.00'], ['1675391580', '110.00'], ['1675391616', '148.53'], ['1675391652', '0.00'], ['1675391688', '583.64'], ['1675391724', '0.00']],
analysis: {
avg: '72.72',
max: '638.00',
min: '0.00',
p95: '326.89'
}
},
egressPacketsRate: {
values: [['1675388124', '0.00'], ['1675388160', '1835.75'], ['1675388196', '865.61'], ['1675388232', '0.00'], ['1675388268', '1202.69'], ['1675388304', '0.00'], ['1675388340', '3864.69'], ['1675388376', '1428.56'], ['1675388412', '0.00'], ['1675388448', '3433.61'], ['1675388484', '0.00'], ['1675388520', '1228.06'], ['1675388556', '896.42'], ['1675388592', '0.00'], ['1675388628', '740.83'], ['1675388664', '0.00'], ['1675388700', '1576.75'], ['1675388736', '721.92'], ['1675388772', '0.00'], ['1675388808', '700.17'], ['1675388844', '0.00'], ['1675388880', '1058.28'], ['1675388916', '1487.19'], ['1675388952', '0.00'], ['1675388988', '1536.19'], ['1675389024', '0.00'], ['1675389060', '1671.50'], ['1675389096', '1083.58'], ['1675389132', '0.00'], ['1675389168', '1561.64'], ['1675389204', '0.00'], ['1675389240', '549.50'], ['1675389276', '2454.47'], ['1675389312', '0.00'], ['1675389348', '404.53'], ['1675389384', '0.00'], ['1675389420', '2011.22'], ['1675389456', '810.75'], ['1675389492', '0.00'], ['1675389528', '228.50'], ['1675389564', '0.00'], ['1675389600', '910.58'], ['1675389636', '6422.11'], ['1675389672', '0.00'], ['1675389708', '2123.44'], ['1675389744', '0.00'], ['1675389780', '481.97'], ['1675389816', '2462.33'], ['1675389852', '0.00'], ['1675389888', '4183.94'], ['1675389924', '0.00'], ['1675389960', '677.81'], ['1675389996', '1103.31'], ['1675390032', '0.00'], ['1675390068', '851.08'], ['1675390104', '0.00'], ['1675390140', '659.33'], ['1675390176', '936.56'], ['1675390212', '0.00'], ['1675390248', '835.78'], ['1675390284', '0.00'], ['1675390320', '296.28'], ['1675390356', '1205.39'], ['1675390392', '0.00'], ['1675390428', '3288.14'], ['1675390464', '0.00'], ['1675390500', '471.14'], ['1675390536', '1577.00'], ['1675390572', '0.00'], ['1675390608', '1645.36'], ['1675390644', '0.00'], ['1675390680', '1390.75'], ['1675390716', '1612.75'], ['1675390752', '0.00'], ['1675390788', '880.92'], ['1675390824', '0.00'], ['1675390860', '1573.47'], ['1675390896', '1809.56'], ['1675390932', '0.00'], ['1675390968', '1847.53'], ['1675391004', '0.00'], ['1675391040', '2160.33'], ['1675391076', '3126.36'], ['1675391112', '0.00'], ['1675391148', '1166.14'], ['1675391184', '0.00'], ['1675391220', '1166.81'], ['1675391256', '538.75'], ['1675391292', '0.00'], ['1675391328', '681.00'], ['1675391364', '0.00'], ['1675391400', '2580.83'], ['1675391436', '1693.17'], ['1675391472', '0.00'], ['1675391508', '695.89'], ['1675391544', '0.00'], ['1675391580', '1395.19'], ['1675391616', '1920.39'], ['1675391652', '0.00'], ['1675391688', '679.08'], ['1675391724', '0.00']],
analysis: {
avg: '904.03',
max: '6422.11',
min: '0.00',
p95: '3126.36'
}
},
totalPacketsRate: {
values: [['1675388124', '0.00'], ['1675388160', '2218.36'], ['1675388196', '910.28'], ['1675388232', '0.00'], ['1675388268', '1226.33'], ['1675388304', '0.00'], ['1675388340', '3918.44'], ['1675388376', '1463.44'], ['1675388412', '0.00'], ['1675388448', '3588.86'], ['1675388484', '0.00'], ['1675388520', '1414.22'], ['1675388556', '974.22'], ['1675388592', '0.00'], ['1675388628', '825.58'], ['1675388664', '0.00'], ['1675388700', '1717.14'], ['1675388736', '731.61'], ['1675388772', '0.00'], ['1675388808', '827.00'], ['1675388844', '0.00'], ['1675388880', '1456.78'], ['1675388916', '1582.11'], ['1675388952', '0.00'], ['1675388988', '1593.53'], ['1675389024', '0.00'], ['1675389060', '1998.39'], ['1675389096', '1152.64'], ['1675389132', '0.00'], ['1675389168', '1815.25'], ['1675389204', '0.00'], ['1675389240', '750.61'], ['1675389276', '2657.61'], ['1675389312', '0.00'], ['1675389348', '530.86'], ['1675389384', '0.00'], ['1675389420', '2025.08'], ['1675389456', '845.56'], ['1675389492', '0.00'], ['1675389528', '240.97'], ['1675389564', '0.00'], ['1675389600', '1017.67'], ['1675389636', '6476.50'], ['1675389672', '0.00'], ['1675389708', '2147.86'], ['1675389744', '0.00'], ['1675389780', '549.44'], ['1675389816', '2498.28'], ['1675389852', '0.00'], ['1675389888', '4206.39'], ['1675389924', '0.00'], ['1675389960', '723.44'], ['1675389996', '1136.11'], ['1675390032', '0.00'], ['1675390068', '888.81'], ['1675390104', '0.00'], ['1675390140', '703.03'], ['1675390176', '1165.53'], ['1675390212', '0.00'], ['1675390248', '1228.47'], ['1675390284', '0.00'], ['1675390320', '351.61'], ['1675390356', '1252.83'], ['1675390392', '0.00'], ['1675390428', '3394.19'], ['1675390464', '0.00'], ['1675390500', '518.72'], ['1675390536', '1641.56'], ['1675390572', '0.00'], ['1675390608', '1681.31'], ['1675390644', '0.00'], ['1675390680', '1408.06'], ['1675390716', '1708.22'], ['1675390752', '0.00'], ['1675390788', '1518.92'], ['1675390824', '0.00'], ['1675390860', '1812.58'], ['1675390896', '2100.44'], ['1675390932', '0.00'], ['1675390968', '1976.83'], ['1675391004', '0.00'], ['1675391040', '2369.17'], ['1675391076', '3191.67'], ['1675391112', '0.00'], ['1675391148', '1208.31'], ['1675391184', '0.00'], ['1675391220', '1184.75'], ['1675391256', '553.08'], ['1675391292', '0.00'], ['1675391328', '687.31'], ['1675391364', '0.00'], ['1675391400', '2643.67'], ['1675391436', '1695.69'], ['1675391472', '0.00'], ['1675391508', '732.94'], ['1675391544', '0.00'], ['1675391580', '1505.19'], ['1675391616', '2068.92'], ['1675391652', '0.00'], ['1675391688', '1262.72'], ['1675391724', '0.00']],
analysis: {
avg: '976.75',
max: '6476.50',
min: '0.00',
p95: '3191.67'
}
}
}]
},
originalUrl: 'http://192.168.44.55:9999?query=SELECT%20TIME_FLOOR_WITH_FILL%28stat_time%2C%27PT36S%27%2C%27zero%27%29%20AS%20stat_time%2CSUM%28IF%28%20common_egress_link_id%20%3D%202048%2C%20traffic_outbound_byte%2C%200%29%29%20AS%20egress_bytes%2CSUM%28IF%28%20common_ingress_link_id%20%3D%202049%2C%20traffic_inbound_byte%2C%200%29%29%20AS%20ingress_bytes%2CSUM%28IF%28%20common_egress_link_id%20%3D%202048%2C%20traffic_outbound_pkt%2C%200%29%29%20AS%20egress_pkt%2CSUM%28IF%28%20common_ingress_link_id%20%3D%202049%2C%20traffic_inbound_pkt%2C%200%29%29%20AS%20ingress_pkt%2C%28egress_bytes%20%2B%20ingress_bytes%29%20AS%20bytes_total%2C%28egress_pkt%20%2B%20ingress_pkt%29%20AS%20packets_total%20FROM%20metric_link%20WHERE%20stat_time%20%3E%3D%201675388125%20AND%20stat_time%20%3C%201675391725%20%20GROUP%20BY%20stat_time%20ORDER%20BY%20bytes_total%20DESC%20&format=json&option=real-time',
msg: 'OK'
}
},
data2: {
data: {
status: 200,
code: 200,
queryKey: 'a54916e7f363fd065dfaa44ad23d31b5',
success: true,
message: null,
statistics: {
elapsed: 4,
rows_read: 10518,
bytes_read: 1062318,
result_size: 186,
result_rows: 1
},
job: null,
formatType: 'json',
meta: [
{
name: 'total_bytes',
type: 'long',
category: 'Metric'
}, {
name: 'total_packets',
type: 'long',
category: 'Metric'
}, {
name: 'establish_latency_ms',
type: 'double',
category: 'Metric'
}, {
name: 'http_response_latency',
type: 'double',
category: 'Metric'
}, {
name: 'ssl_con_latency',
type: 'double',
category: 'Metric'
}, {
name: 'tcp_lostlen_percent',
type: 'double',
category: 'Metric'
}, {
name: 'pkt_retrans_percent',
type: 'double',
category: 'Metric'
}],
data: {
resultType: 'table',
result: [{
totalBytes: '4426409159',
totalBitsRate: 9836464.8,
totalPackets: '3324302',
establishLatencyMs: 92.9489,
httpResponseLatency: 154.2884,
sslConLatency: 0,
tcpLostlenPercent: 0.0069,
pktRetransPercent: 0.0165
}]
},
originalUrl: 'http://192.168.44.55:9999?query=SELECT%20SUM%28IF%28%20common_egress_link_id%20%3D%201792%2C%20traffic_outbound_byte%2C%200%29%20%2B%20IF%28%20common_ingress_link_id%20%3D%201793%2C%20traffic_inbound_byte%2C%200%29%29%20as%20total_bytes%2CSUM%28IF%28%20common_egress_link_id%20%3D%201792%2C%20traffic_outbound_pkt%2C%200%29%20%2B%20IF%28%20common_ingress_link_id%20%3D%201793%2C%20traffic_inbound_pkt%2C%200%29%29%20AS%20total_packets%2CROUND%28AVG%28avg_establish_latency_ms%29%2C%204%29%20AS%20establish_latency_ms%2CROUND%28AVG%28avg_http_response_latency_ms%29%2C%204%29%20AS%20http_response_latency%2CROUND%28AVG%28avg_ssl_con_latency_ms%29%2C%204%29%20AS%20ssl_con_latency%2CROUND%28AVG%28tcp_lostlen_ratio%29%2C%204%29%20AS%20tcp_lostlen_percent%2CROUND%28AVG%28pkt_retrans_ratio%29%2C%204%29%20AS%20pkt_retrans_percent%20FROM%20metric_link%20WHERE%20stat_time%20%3E%3D%201675403646%20AND%20stat_time%20%3C%201675407246%20&format=json&option=real-time',
msg: 'OK'
}
}
},
empty: {
data1: {
data: {
status: 200,
code: 200,
data: {
resultType: 'table',
result: []
},
msg: 'OK'
}
},
data2: {
data: {
status: 200,
code: 200,
data: {
resultType: 'table',
result: []
},
msg: 'OK'
}
}
},
boundary: {
large: {
data1: {
data: {
status: 200,
code: 200,
data: {
resultType: 'object',
result: [
{
type: 'bytes',
ingressBitsRate: {
values: [['1675388124', '0'], ['1675388160', '4253144'], ['1675388196', '470709.36'], ['1675388232', '0'], ['1675388268', '148192.24'], ['1675388304', '0'], ['1675388340', '577072.48'], ['1675388376', '160431.12'], ['1675388412', '0'], ['1675388448', '1639602.64'], ['1675388484', '0'], ['1675388520', '2074017.36'], ['1675388556', '798924.64'], ['1675388592', '0'], ['1675388628', '884606'], ['1675388664', '0'], ['1675388700', '1373220.48'], ['1675388736', '21305.36'], ['1675388772', '0'], ['1675388808', '1398940.24'], ['1675388844', '0'], ['1675388880', '4474519.52'], ['1675388916', '383473.12'], ['1675388952', '0'], ['1675388988', '582813.36'], ['1675389024', '0'], ['1675389060', '3545078.24'], ['1675389096', '766672'], ['1675389132', '0'], ['1675389168', '2877694'], ['1675389204', '0'], ['1675389240', '2195562.48'], ['1675389276', '2268681.12'], ['1675389312', '0'], ['1675389348', '1438248.88'], ['1675389384', '0'], ['1675389420', '88914.24'], ['1675389456', '363776.24'], ['1675389492', '0'], ['1675389528', '103931.36'], ['1675389564', '0'], ['1675389600', '930861.12'], ['1675389636', '473982.48'], ['1675389672', '0'], ['1675389708', '210004.88'], ['1675389744', '0'], ['1675389780', '764367.52'], ['1675389816', '236745.52'], ['1675389852', '0'], ['1675389888', '199598'], ['1675389924', '0'], ['1675389960', '385563.36'], ['1675389996', '353556.64'], ['1675390032', '0'], ['1675390068', '380246.48'], ['1675390104', '0'], ['1675390140', '456284'], ['1675390176', '2560143.76'], ['1675390212', '0'], ['1675390248', '3806779.36'], ['1675390284', '0'], ['1675390320', '382829.52'], ['1675390356', '225432.48'], ['1675390392', '0'], ['1675390428', '1024283.52'], ['1675390464', '0'], ['1675390500', '494194.88'], ['1675390536', '718094.88'], ['1675390572', '0'], ['1675390608', '373146.64'], ['1675390644', '0'], ['1675390680', '101628.64'], ['1675390716', '977218'], ['1675390752', '0'], ['1675390788', '7263452.48'], ['1675390824', '0'], ['1675390860', '2613115.76'], ['1675390896', '2987862'], ['1675390932', '0'], ['1675390968', '1376989.36'], ['1675391004', '0'], ['1675391040', '2245663.12'], ['1675391076', '602240.64'], ['1675391112', '0'], ['1675391148', '437569.12'], ['1675391184', '0'], ['1675391220', '115680.88'], ['1675391256', '42582.24'], ['1675391292', '0'], ['1675391328', '42002'], ['1675391364', '0'], ['1675391400', '720716'], ['1675391436', '5382.88'], ['1675391472', '0'], ['1675391508', '169074.64'], ['1675391544', '0'], ['1675391580', '1214277.76'], ['1675391616', '1523679.76'], ['1675391652', '0'], ['1675391688', '6382256'], ['1675391724', '0']],
analysis: {
avg: '75687040000000',
max: '7263452.48',
min: '0',
p95: '3545078.24'
}
},
totalBitsRate: {
values: [['1675388124', '0'], ['1675388160', '17581092.48'], ['1675388196', '9918148.64'], ['1675388232', '0'], ['1675388268', '13213336.64'], ['1675388304', '0'], ['1675388340', '41123655.76'], ['1675388376', '14569548.64'], ['1675388412', '0'], ['1675388448', '39157977.52'], ['1675388484', '0'], ['1675388520', '15875735.76'], ['1675388556', '10885102.24'], ['1675388592', '0'], ['1675388628', '8943487.12'], ['1675388664', '0'], ['1675388700', '18985121.76'], ['1675388736', '7659627.36'], ['1675388772', '0'], ['1675388808', '9288266.88'], ['1675388844', '0'], ['1675388880', '15999674.24'], ['1675388916', '16802700.48'], ['1675388952', '0'], ['1675388988', '17836499.52'], ['1675389024', '0'], ['1675389060', '22368492'], ['1675389096', '12570182.88'], ['1675389132', '0'], ['1675389168', '19977345.36'], ['1675389204', '0'], ['1675389240', '7747381.76'], ['1675389276', '29050230.64'], ['1675389312', '0'], ['1675389348', '5834855.36'], ['1675389384', '0'], ['1675389420', '22798420.24'], ['1675389456', '9061622.64'], ['1675389492', '0'], ['1675389528', '2391149.76'], ['1675389564', '0'], ['1675389600', '10752915.76'], ['1675389636', '72671214'], ['1675389672', '0'], ['1675389708', '23536865.76'], ['1675389744', '0'], ['1675389780', '6080925.76'], ['1675389816', '27096624.64'], ['1675389852', '0'], ['1675389888', '47355125.36'], ['1675389924', '0'], ['1675389960', '7525635.52'], ['1675389996', '12312211.76'], ['1675390032', '0'], ['1675390068', '9587065.36'], ['1675390104', '0'], ['1675390140', '7763073.36'], ['1675390176', '12692375.36'], ['1675390212', '0'], ['1675390248', '13007133.76'], ['1675390284', '0'], ['1675390320', '3241344.88'], ['1675390356', '13811041.12'], ['1675390392', '0'], ['1675390428', '38206391.36'], ['1675390464', '0'], ['1675390500', '5489114'], ['1675390536', '17855136.88'], ['1675390572', '0'], ['1675390608', '18409624.48'], ['1675390644', '0'], ['1675390680', '15132633.12'], ['1675390716', '19189583.52'], ['1675390752', '0'], ['1675390788', '16803327.36'], ['1675390824', '0'], ['1675390860', '19972804.88'], ['1675390896', '22541580.48'], ['1675390932', '0'], ['1675390968', '21671364.88'], ['1675391004', '0'], ['1675391040', '25293518.24'], ['1675391076', '34056467.52'], ['1675391112', '0'], ['1675391148', '13181229.76'], ['1675391184', '0'], ['1675391220', '12337126.88'], ['1675391256', '5989032.64'], ['1675391292', '0'], ['1675391328', '7393281.36'], ['1675391364', '0'], ['1675391400', '29175007.36'], ['1675391436', '17228925.76'], ['1675391472', '0'], ['1675391508', '7375468'], ['1675391544', '0'], ['1675391580', '16675685.76'], ['1675391616', '22908316'], ['1675391652', '0'], ['1675391688', '13867890.88'], ['1675391724', '0']],
analysis: {
avg: '10578267.2',
max: '72671214',
min: '0',
p95: '34056467.52'
}
},
egressBitsRate: {
values: [['1675388124', '0'], ['1675388160', '13327948.48'], ['1675388196', '9447439.36'], ['1675388232', '0'], ['1675388268', '13065144.48'], ['1675388304', '0'], ['1675388340', '40546583.36'], ['1675388376', '14409117.52'], ['1675388412', '0'], ['1675388448', '37518374.88'], ['1675388484', '0'], ['1675388520', '13801718.48'], ['1675388556', '10086177.52'], ['1675388592', '0'], ['1675388628', '8058881.12'], ['1675388664', '0'], ['1675388700', '17611901.36'], ['1675388736', '7638322'], ['1675388772', '0'], ['1675388808', '7889326.64'], ['1675388844', '0'], ['1675388880', '11525154.64'], ['1675388916', '16419227.36'], ['1675388952', '0'], ['1675388988', '17253686.24'], ['1675389024', '0'], ['1675389060', '18823413.76'], ['1675389096', '11803510.88'], ['1675389132', '0'], ['1675389168', '17099651.36'], ['1675389204', '0'], ['1675389240', '5551819.36'], ['1675389276', '26781549.52'], ['1675389312', '0'], ['1675389348', '4396606.48'], ['1675389384', '0'], ['1675389420', '22709506'], ['1675389456', '8697846.48'], ['1675389492', '0'], ['1675389528', '2287218.48'], ['1675389564', '0'], ['1675389600', '9822054.64'], ['1675389636', '72197231.52'], ['1675389672', '0'], ['1675389708', '23326860.88'], ['1675389744', '0'], ['1675389780', '5316558.24'], ['1675389816', '26859879.12'], ['1675389852', '0'], ['1675389888', '47155527.36'], ['1675389924', '0'], ['1675389960', '7140072.24'], ['1675389996', '11958655.12'], ['1675390032', '0'], ['1675390068', '9206818.88'], ['1675390104', '0'], ['1675390140', '7306789.36'], ['1675390176', '10132231.52'], ['1675390212', '0'], ['1675390248', '9200354.48'], ['1675390284', '0'], ['1675390320', '2858515.36'], ['1675390356', '13585608.64'], ['1675390392', '0'], ['1675390428', '37182107.76'], ['1675390464', '0'], ['1675390500', '4994919.12'], ['1675390536', '17137042'], ['1675390572', '0'], ['1675390608', '18036477.76'], ['1675390644', '0'], ['1675390680', '15031004.48'], ['1675390716', '18212365.52'], ['1675390752', '0'], ['1675390788', '9539874.88'], ['1675390824', '0'], ['1675390860', '17359689.12'], ['1675390896', '19553718.48'], ['1675390932', '0'], ['1675390968', '20294375.52'], ['1675391004', '0'], ['1675391040', '23047855.12'], ['1675391076', '33454226.88'], ['1675391112', '0'], ['1675391148', '12743660.64'], ['1675391184', '0'], ['1675391220', '12221446'], ['1675391256', '5946450.48'], ['1675391292', '0'], ['1675391328', '7351279.36'], ['1675391364', '0'], ['1675391400', '28454291.36'], ['1675391436', '17223542.88'], ['1675391472', '0'], ['1675391508', '7206393.36'], ['1675391544', '0'], ['1675391580', '15461408'], ['1675391616', '21384636.24'], ['1675391652', '0'], ['1675391688', '7485634.88'], ['1675391724', '0']],
analysis: {
avg: '9821396.8',
max: '72197231.52',
min: '0',
p95: '33454226.88'
}
}
},
{
type: 'packets',
ingressPacketsRate: {
values: [['1675388124', '0.00'], ['1675388160', '382.61'], ['1675388196', '44.67'], ['1675388232', '0.00'], ['1675388268', '23.64'], ['1675388304', '0.00'], ['1675388340', '53.75'], ['1675388376', '34.89'], ['1675388412', '0.00'], ['1675388448', '155.25'], ['1675388484', '0.00'], ['1675388520', '186.17'], ['1675388556', '77.81'], ['1675388592', '0.00'], ['1675388628', '84.75'], ['1675388664', '0.00'], ['1675388700', '140.39'], ['1675388736', '9.69'], ['1675388772', '0.00'], ['1675388808', '126.83'], ['1675388844', '0.00'], ['1675388880', '398.50'], ['1675388916', '94.92'], ['1675388952', '0.00'], ['1675388988', '57.33'], ['1675389024', '0.00'], ['1675389060', '326.89'], ['1675389096', '69.06'], ['1675389132', '0.00'], ['1675389168', '253.61'], ['1675389204', '0.00'], ['1675389240', '201.11'], ['1675389276', '203.14'], ['1675389312', '0.00'], ['1675389348', '126.33'], ['1675389384', '0.00'], ['1675389420', '13.86'], ['1675389456', '34.81'], ['1675389492', '0.00'], ['1675389528', '12.47'], ['1675389564', '0.00'], ['1675389600', '107.08'], ['1675389636', '54.39'], ['1675389672', '0.00'], ['1675389708', '24.42'], ['1675389744', '0.00'], ['1675389780', '67.47'], ['1675389816', '35.94'], ['1675389852', '0.00'], ['1675389888', '22.44'], ['1675389924', '0.00'], ['1675389960', '45.64'], ['1675389996', '32.81'], ['1675390032', '0.00'], ['1675390068', '37.72'], ['1675390104', '0.00'], ['1675390140', '43.69'], ['1675390176', '228.97'], ['1675390212', '0.00'], ['1675390248', '392.69'], ['1675390284', '0.00'], ['1675390320', '55.33'], ['1675390356', '47.44'], ['1675390392', '0.00'], ['1675390428', '106.06'], ['1675390464', '0.00'], ['1675390500', '47.58'], ['1675390536', '64.56'], ['1675390572', '0.00'], ['1675390608', '35.94'], ['1675390644', '0.00'], ['1675390680', '17.31'], ['1675390716', '95.47'], ['1675390752', '0.00'], ['1675390788', '638.00'], ['1675390824', '0.00'], ['1675390860', '239.11'], ['1675390896', '290.89'], ['1675390932', '0.00'], ['1675390968', '129.31'], ['1675391004', '0.00'], ['1675391040', '208.83'], ['1675391076', '65.31'], ['1675391112', '0.00'], ['1675391148', '42.17'], ['1675391184', '0.00'], ['1675391220', '17.94'], ['1675391256', '14.33'], ['1675391292', '0.00'], ['1675391328', '6.31'], ['1675391364', '0.00'], ['1675391400', '62.83'], ['1675391436', '2.53'], ['1675391472', '0.00'], ['1675391508', '37.06'], ['1675391544', '0.00'], ['1675391580', '110.00'], ['1675391616', '148.53'], ['1675391652', '0.00'], ['1675391688', '583.64'], ['1675391724', '0.00']],
analysis: {
avg: '727200000',
max: '638.00',
min: '0.00',
p95: '326.89'
}
},
egressPacketsRate: {
values: [['1675388124', '0.00'], ['1675388160', '1835.75'], ['1675388196', '865.61'], ['1675388232', '0.00'], ['1675388268', '1202.69'], ['1675388304', '0.00'], ['1675388340', '3864.69'], ['1675388376', '1428.56'], ['1675388412', '0.00'], ['1675388448', '3433.61'], ['1675388484', '0.00'], ['1675388520', '1228.06'], ['1675388556', '896.42'], ['1675388592', '0.00'], ['1675388628', '740.83'], ['1675388664', '0.00'], ['1675388700', '1576.75'], ['1675388736', '721.92'], ['1675388772', '0.00'], ['1675388808', '700.17'], ['1675388844', '0.00'], ['1675388880', '1058.28'], ['1675388916', '1487.19'], ['1675388952', '0.00'], ['1675388988', '1536.19'], ['1675389024', '0.00'], ['1675389060', '1671.50'], ['1675389096', '1083.58'], ['1675389132', '0.00'], ['1675389168', '1561.64'], ['1675389204', '0.00'], ['1675389240', '549.50'], ['1675389276', '2454.47'], ['1675389312', '0.00'], ['1675389348', '404.53'], ['1675389384', '0.00'], ['1675389420', '2011.22'], ['1675389456', '810.75'], ['1675389492', '0.00'], ['1675389528', '228.50'], ['1675389564', '0.00'], ['1675389600', '910.58'], ['1675389636', '6422.11'], ['1675389672', '0.00'], ['1675389708', '2123.44'], ['1675389744', '0.00'], ['1675389780', '481.97'], ['1675389816', '2462.33'], ['1675389852', '0.00'], ['1675389888', '4183.94'], ['1675389924', '0.00'], ['1675389960', '677.81'], ['1675389996', '1103.31'], ['1675390032', '0.00'], ['1675390068', '851.08'], ['1675390104', '0.00'], ['1675390140', '659.33'], ['1675390176', '936.56'], ['1675390212', '0.00'], ['1675390248', '835.78'], ['1675390284', '0.00'], ['1675390320', '296.28'], ['1675390356', '1205.39'], ['1675390392', '0.00'], ['1675390428', '3288.14'], ['1675390464', '0.00'], ['1675390500', '471.14'], ['1675390536', '1577.00'], ['1675390572', '0.00'], ['1675390608', '1645.36'], ['1675390644', '0.00'], ['1675390680', '1390.75'], ['1675390716', '1612.75'], ['1675390752', '0.00'], ['1675390788', '880.92'], ['1675390824', '0.00'], ['1675390860', '1573.47'], ['1675390896', '1809.56'], ['1675390932', '0.00'], ['1675390968', '1847.53'], ['1675391004', '0.00'], ['1675391040', '2160.33'], ['1675391076', '3126.36'], ['1675391112', '0.00'], ['1675391148', '1166.14'], ['1675391184', '0.00'], ['1675391220', '1166.81'], ['1675391256', '538.75'], ['1675391292', '0.00'], ['1675391328', '681.00'], ['1675391364', '0.00'], ['1675391400', '2580.83'], ['1675391436', '1693.17'], ['1675391472', '0.00'], ['1675391508', '695.89'], ['1675391544', '0.00'], ['1675391580', '1395.19'], ['1675391616', '1920.39'], ['1675391652', '0.00'], ['1675391688', '679.08'], ['1675391724', '0.00']],
analysis: {
avg: '904030000000',
max: '6422.11',
min: '0.00',
p95: '3126.36'
}
},
totalPacketsRate: {
values: [['1675388124', '0.00'], ['1675388160', '2218.36'], ['1675388196', '910.28'], ['1675388232', '0.00'], ['1675388268', '1226.33'], ['1675388304', '0.00'], ['1675388340', '3918.44'], ['1675388376', '1463.44'], ['1675388412', '0.00'], ['1675388448', '3588.86'], ['1675388484', '0.00'], ['1675388520', '1414.22'], ['1675388556', '974.22'], ['1675388592', '0.00'], ['1675388628', '825.58'], ['1675388664', '0.00'], ['1675388700', '1717.14'], ['1675388736', '731.61'], ['1675388772', '0.00'], ['1675388808', '827.00'], ['1675388844', '0.00'], ['1675388880', '1456.78'], ['1675388916', '1582.11'], ['1675388952', '0.00'], ['1675388988', '1593.53'], ['1675389024', '0.00'], ['1675389060', '1998.39'], ['1675389096', '1152.64'], ['1675389132', '0.00'], ['1675389168', '1815.25'], ['1675389204', '0.00'], ['1675389240', '750.61'], ['1675389276', '2657.61'], ['1675389312', '0.00'], ['1675389348', '530.86'], ['1675389384', '0.00'], ['1675389420', '2025.08'], ['1675389456', '845.56'], ['1675389492', '0.00'], ['1675389528', '240.97'], ['1675389564', '0.00'], ['1675389600', '1017.67'], ['1675389636', '6476.50'], ['1675389672', '0.00'], ['1675389708', '2147.86'], ['1675389744', '0.00'], ['1675389780', '549.44'], ['1675389816', '2498.28'], ['1675389852', '0.00'], ['1675389888', '4206.39'], ['1675389924', '0.00'], ['1675389960', '723.44'], ['1675389996', '1136.11'], ['1675390032', '0.00'], ['1675390068', '888.81'], ['1675390104', '0.00'], ['1675390140', '703.03'], ['1675390176', '1165.53'], ['1675390212', '0.00'], ['1675390248', '1228.47'], ['1675390284', '0.00'], ['1675390320', '351.61'], ['1675390356', '1252.83'], ['1675390392', '0.00'], ['1675390428', '3394.19'], ['1675390464', '0.00'], ['1675390500', '518.72'], ['1675390536', '1641.56'], ['1675390572', '0.00'], ['1675390608', '1681.31'], ['1675390644', '0.00'], ['1675390680', '1408.06'], ['1675390716', '1708.22'], ['1675390752', '0.00'], ['1675390788', '1518.92'], ['1675390824', '0.00'], ['1675390860', '1812.58'], ['1675390896', '2100.44'], ['1675390932', '0.00'], ['1675390968', '1976.83'], ['1675391004', '0.00'], ['1675391040', '2369.17'], ['1675391076', '3191.67'], ['1675391112', '0.00'], ['1675391148', '1208.31'], ['1675391184', '0.00'], ['1675391220', '1184.75'], ['1675391256', '553.08'], ['1675391292', '0.00'], ['1675391328', '687.31'], ['1675391364', '0.00'], ['1675391400', '2643.67'], ['1675391436', '1695.69'], ['1675391472', '0.00'], ['1675391508', '732.94'], ['1675391544', '0.00'], ['1675391580', '1505.19'], ['1675391616', '2068.92'], ['1675391652', '0.00'], ['1675391688', '1262.72'], ['1675391724', '0.00']],
analysis: {
avg: '976750000000',
max: '6476.50',
min: '0.00',
p95: '3191.67'
}
}
}]
}
}
},
data2: {
data: {
status: 200,
code: 200,
data: {
resultType: 'table',
result: [{
totalBytes: '4426409159',
totalBitsRate: 983646480,
totalPackets: '3324302',
establishLatencyMs: 9294.89,
httpResponseLatency: 154.2884,
sslConLatency: 90,
tcpLostlenPercent: 0.69,
pktRetransPercent: 0.165
}]
}
}
}
},
zero: {
data1: {
data: {
status: 200,
code: 200,
data: {
resultType: 'object',
result: [
{
type: 'bytes',
ingressBitsRate: {
values: [['1675388124', '0'], ['1675388160', '4253144'], ['1675388196', '470709.36'], ['1675388232', '0'], ['1675388268', '148192.24'], ['1675388304', '0'], ['1675388340', '577072.48'], ['1675388376', '160431.12'], ['1675388412', '0'], ['1675388448', '1639602.64'], ['1675388484', '0'], ['1675388520', '2074017.36'], ['1675388556', '798924.64'], ['1675388592', '0'], ['1675388628', '884606'], ['1675388664', '0'], ['1675388700', '1373220.48'], ['1675388736', '21305.36'], ['1675388772', '0'], ['1675388808', '1398940.24'], ['1675388844', '0'], ['1675388880', '4474519.52'], ['1675388916', '383473.12'], ['1675388952', '0'], ['1675388988', '582813.36'], ['1675389024', '0'], ['1675389060', '3545078.24'], ['1675389096', '766672'], ['1675389132', '0'], ['1675389168', '2877694'], ['1675389204', '0'], ['1675389240', '2195562.48'], ['1675389276', '2268681.12'], ['1675389312', '0'], ['1675389348', '1438248.88'], ['1675389384', '0'], ['1675389420', '88914.24'], ['1675389456', '363776.24'], ['1675389492', '0'], ['1675389528', '103931.36'], ['1675389564', '0'], ['1675389600', '930861.12'], ['1675389636', '473982.48'], ['1675389672', '0'], ['1675389708', '210004.88'], ['1675389744', '0'], ['1675389780', '764367.52'], ['1675389816', '236745.52'], ['1675389852', '0'], ['1675389888', '199598'], ['1675389924', '0'], ['1675389960', '385563.36'], ['1675389996', '353556.64'], ['1675390032', '0'], ['1675390068', '380246.48'], ['1675390104', '0'], ['1675390140', '456284'], ['1675390176', '2560143.76'], ['1675390212', '0'], ['1675390248', '3806779.36'], ['1675390284', '0'], ['1675390320', '382829.52'], ['1675390356', '225432.48'], ['1675390392', '0'], ['1675390428', '1024283.52'], ['1675390464', '0'], ['1675390500', '494194.88'], ['1675390536', '718094.88'], ['1675390572', '0'], ['1675390608', '373146.64'], ['1675390644', '0'], ['1675390680', '101628.64'], ['1675390716', '977218'], ['1675390752', '0'], ['1675390788', '7263452.48'], ['1675390824', '0'], ['1675390860', '2613115.76'], ['1675390896', '2987862'], ['1675390932', '0'], ['1675390968', '1376989.36'], ['1675391004', '0'], ['1675391040', '2245663.12'], ['1675391076', '602240.64'], ['1675391112', '0'], ['1675391148', '437569.12'], ['1675391184', '0'], ['1675391220', '115680.88'], ['1675391256', '42582.24'], ['1675391292', '0'], ['1675391328', '42002'], ['1675391364', '0'], ['1675391400', '720716'], ['1675391436', '5382.88'], ['1675391472', '0'], ['1675391508', '169074.64'], ['1675391544', '0'], ['1675391580', '1214277.76'], ['1675391616', '1523679.76'], ['1675391652', '0'], ['1675391688', '6382256'], ['1675391724', '0']],
analysis: {
avg: '0.00',
max: '0.00',
min: '0',
p95: '3545078.24'
}
},
totalBitsRate: {
values: [['1675388124', '0'], ['1675388160', '17581092.48'], ['1675388196', '9918148.64'], ['1675388232', '0'], ['1675388268', '13213336.64'], ['1675388304', '0'], ['1675388340', '41123655.76'], ['1675388376', '14569548.64'], ['1675388412', '0'], ['1675388448', '39157977.52'], ['1675388484', '0'], ['1675388520', '15875735.76'], ['1675388556', '10885102.24'], ['1675388592', '0'], ['1675388628', '8943487.12'], ['1675388664', '0'], ['1675388700', '18985121.76'], ['1675388736', '7659627.36'], ['1675388772', '0'], ['1675388808', '9288266.88'], ['1675388844', '0'], ['1675388880', '15999674.24'], ['1675388916', '16802700.48'], ['1675388952', '0'], ['1675388988', '17836499.52'], ['1675389024', '0'], ['1675389060', '22368492'], ['1675389096', '12570182.88'], ['1675389132', '0'], ['1675389168', '19977345.36'], ['1675389204', '0'], ['1675389240', '7747381.76'], ['1675389276', '29050230.64'], ['1675389312', '0'], ['1675389348', '5834855.36'], ['1675389384', '0'], ['1675389420', '22798420.24'], ['1675389456', '9061622.64'], ['1675389492', '0'], ['1675389528', '2391149.76'], ['1675389564', '0'], ['1675389600', '10752915.76'], ['1675389636', '72671214'], ['1675389672', '0'], ['1675389708', '23536865.76'], ['1675389744', '0'], ['1675389780', '6080925.76'], ['1675389816', '27096624.64'], ['1675389852', '0'], ['1675389888', '47355125.36'], ['1675389924', '0'], ['1675389960', '7525635.52'], ['1675389996', '12312211.76'], ['1675390032', '0'], ['1675390068', '9587065.36'], ['1675390104', '0'], ['1675390140', '7763073.36'], ['1675390176', '12692375.36'], ['1675390212', '0'], ['1675390248', '13007133.76'], ['1675390284', '0'], ['1675390320', '3241344.88'], ['1675390356', '13811041.12'], ['1675390392', '0'], ['1675390428', '38206391.36'], ['1675390464', '0'], ['1675390500', '5489114'], ['1675390536', '17855136.88'], ['1675390572', '0'], ['1675390608', '18409624.48'], ['1675390644', '0'], ['1675390680', '15132633.12'], ['1675390716', '19189583.52'], ['1675390752', '0'], ['1675390788', '16803327.36'], ['1675390824', '0'], ['1675390860', '19972804.88'], ['1675390896', '22541580.48'], ['1675390932', '0'], ['1675390968', '21671364.88'], ['1675391004', '0'], ['1675391040', '25293518.24'], ['1675391076', '34056467.52'], ['1675391112', '0'], ['1675391148', '13181229.76'], ['1675391184', '0'], ['1675391220', '12337126.88'], ['1675391256', '5989032.64'], ['1675391292', '0'], ['1675391328', '7393281.36'], ['1675391364', '0'], ['1675391400', '29175007.36'], ['1675391436', '17228925.76'], ['1675391472', '0'], ['1675391508', '7375468'], ['1675391544', '0'], ['1675391580', '16675685.76'], ['1675391616', '22908316'], ['1675391652', '0'], ['1675391688', '13867890.88'], ['1675391724', '0']],
analysis: {
avg: '0.00',
max: '0.00',
min: '0',
p95: '34056467.52'
}
},
egressBitsRate: {
values: [['1675388124', '0'], ['1675388160', '13327948.48'], ['1675388196', '9447439.36'], ['1675388232', '0'], ['1675388268', '13065144.48'], ['1675388304', '0'], ['1675388340', '40546583.36'], ['1675388376', '14409117.52'], ['1675388412', '0'], ['1675388448', '37518374.88'], ['1675388484', '0'], ['1675388520', '13801718.48'], ['1675388556', '10086177.52'], ['1675388592', '0'], ['1675388628', '8058881.12'], ['1675388664', '0'], ['1675388700', '17611901.36'], ['1675388736', '7638322'], ['1675388772', '0'], ['1675388808', '7889326.64'], ['1675388844', '0'], ['1675388880', '11525154.64'], ['1675388916', '16419227.36'], ['1675388952', '0'], ['1675388988', '17253686.24'], ['1675389024', '0'], ['1675389060', '18823413.76'], ['1675389096', '11803510.88'], ['1675389132', '0'], ['1675389168', '17099651.36'], ['1675389204', '0'], ['1675389240', '5551819.36'], ['1675389276', '26781549.52'], ['1675389312', '0'], ['1675389348', '4396606.48'], ['1675389384', '0'], ['1675389420', '22709506'], ['1675389456', '8697846.48'], ['1675389492', '0'], ['1675389528', '2287218.48'], ['1675389564', '0'], ['1675389600', '9822054.64'], ['1675389636', '72197231.52'], ['1675389672', '0'], ['1675389708', '23326860.88'], ['1675389744', '0'], ['1675389780', '5316558.24'], ['1675389816', '26859879.12'], ['1675389852', '0'], ['1675389888', '47155527.36'], ['1675389924', '0'], ['1675389960', '7140072.24'], ['1675389996', '11958655.12'], ['1675390032', '0'], ['1675390068', '9206818.88'], ['1675390104', '0'], ['1675390140', '7306789.36'], ['1675390176', '10132231.52'], ['1675390212', '0'], ['1675390248', '9200354.48'], ['1675390284', '0'], ['1675390320', '2858515.36'], ['1675390356', '13585608.64'], ['1675390392', '0'], ['1675390428', '37182107.76'], ['1675390464', '0'], ['1675390500', '4994919.12'], ['1675390536', '17137042'], ['1675390572', '0'], ['1675390608', '18036477.76'], ['1675390644', '0'], ['1675390680', '15031004.48'], ['1675390716', '18212365.52'], ['1675390752', '0'], ['1675390788', '9539874.88'], ['1675390824', '0'], ['1675390860', '17359689.12'], ['1675390896', '19553718.48'], ['1675390932', '0'], ['1675390968', '20294375.52'], ['1675391004', '0'], ['1675391040', '23047855.12'], ['1675391076', '33454226.88'], ['1675391112', '0'], ['1675391148', '12743660.64'], ['1675391184', '0'], ['1675391220', '12221446'], ['1675391256', '5946450.48'], ['1675391292', '0'], ['1675391328', '7351279.36'], ['1675391364', '0'], ['1675391400', '28454291.36'], ['1675391436', '17223542.88'], ['1675391472', '0'], ['1675391508', '7206393.36'], ['1675391544', '0'], ['1675391580', '15461408'], ['1675391616', '21384636.24'], ['1675391652', '0'], ['1675391688', '7485634.88'], ['1675391724', '0']],
analysis: {
avg: '0.00',
max: '0.00',
min: '0',
p95: '33454226.88'
}
}
},
{
type: 'packets',
ingressPacketsRate: {
values: [['1675388124', '0.00'], ['1675388160', '382.61'], ['1675388196', '44.67'], ['1675388232', '0.00'], ['1675388268', '23.64'], ['1675388304', '0.00'], ['1675388340', '53.75'], ['1675388376', '34.89'], ['1675388412', '0.00'], ['1675388448', '155.25'], ['1675388484', '0.00'], ['1675388520', '186.17'], ['1675388556', '77.81'], ['1675388592', '0.00'], ['1675388628', '84.75'], ['1675388664', '0.00'], ['1675388700', '140.39'], ['1675388736', '9.69'], ['1675388772', '0.00'], ['1675388808', '126.83'], ['1675388844', '0.00'], ['1675388880', '398.50'], ['1675388916', '94.92'], ['1675388952', '0.00'], ['1675388988', '57.33'], ['1675389024', '0.00'], ['1675389060', '326.89'], ['1675389096', '69.06'], ['1675389132', '0.00'], ['1675389168', '253.61'], ['1675389204', '0.00'], ['1675389240', '201.11'], ['1675389276', '203.14'], ['1675389312', '0.00'], ['1675389348', '126.33'], ['1675389384', '0.00'], ['1675389420', '13.86'], ['1675389456', '34.81'], ['1675389492', '0.00'], ['1675389528', '12.47'], ['1675389564', '0.00'], ['1675389600', '107.08'], ['1675389636', '54.39'], ['1675389672', '0.00'], ['1675389708', '24.42'], ['1675389744', '0.00'], ['1675389780', '67.47'], ['1675389816', '35.94'], ['1675389852', '0.00'], ['1675389888', '22.44'], ['1675389924', '0.00'], ['1675389960', '45.64'], ['1675389996', '32.81'], ['1675390032', '0.00'], ['1675390068', '37.72'], ['1675390104', '0.00'], ['1675390140', '43.69'], ['1675390176', '228.97'], ['1675390212', '0.00'], ['1675390248', '392.69'], ['1675390284', '0.00'], ['1675390320', '55.33'], ['1675390356', '47.44'], ['1675390392', '0.00'], ['1675390428', '106.06'], ['1675390464', '0.00'], ['1675390500', '47.58'], ['1675390536', '64.56'], ['1675390572', '0.00'], ['1675390608', '35.94'], ['1675390644', '0.00'], ['1675390680', '17.31'], ['1675390716', '95.47'], ['1675390752', '0.00'], ['1675390788', '638.00'], ['1675390824', '0.00'], ['1675390860', '239.11'], ['1675390896', '290.89'], ['1675390932', '0.00'], ['1675390968', '129.31'], ['1675391004', '0.00'], ['1675391040', '208.83'], ['1675391076', '65.31'], ['1675391112', '0.00'], ['1675391148', '42.17'], ['1675391184', '0.00'], ['1675391220', '17.94'], ['1675391256', '14.33'], ['1675391292', '0.00'], ['1675391328', '6.31'], ['1675391364', '0.00'], ['1675391400', '62.83'], ['1675391436', '2.53'], ['1675391472', '0.00'], ['1675391508', '37.06'], ['1675391544', '0.00'], ['1675391580', '110.00'], ['1675391616', '148.53'], ['1675391652', '0.00'], ['1675391688', '583.64'], ['1675391724', '0.00']],
analysis: {
avg: '0.00',
max: '0.00',
min: '0.00',
p95: '326.89'
}
},
egressPacketsRate: {
values: [['1675388124', '0.00'], ['1675388160', '1835.75'], ['1675388196', '865.61'], ['1675388232', '0.00'], ['1675388268', '1202.69'], ['1675388304', '0.00'], ['1675388340', '3864.69'], ['1675388376', '1428.56'], ['1675388412', '0.00'], ['1675388448', '3433.61'], ['1675388484', '0.00'], ['1675388520', '1228.06'], ['1675388556', '896.42'], ['1675388592', '0.00'], ['1675388628', '740.83'], ['1675388664', '0.00'], ['1675388700', '1576.75'], ['1675388736', '721.92'], ['1675388772', '0.00'], ['1675388808', '700.17'], ['1675388844', '0.00'], ['1675388880', '1058.28'], ['1675388916', '1487.19'], ['1675388952', '0.00'], ['1675388988', '1536.19'], ['1675389024', '0.00'], ['1675389060', '1671.50'], ['1675389096', '1083.58'], ['1675389132', '0.00'], ['1675389168', '1561.64'], ['1675389204', '0.00'], ['1675389240', '549.50'], ['1675389276', '2454.47'], ['1675389312', '0.00'], ['1675389348', '404.53'], ['1675389384', '0.00'], ['1675389420', '2011.22'], ['1675389456', '810.75'], ['1675389492', '0.00'], ['1675389528', '228.50'], ['1675389564', '0.00'], ['1675389600', '910.58'], ['1675389636', '6422.11'], ['1675389672', '0.00'], ['1675389708', '2123.44'], ['1675389744', '0.00'], ['1675389780', '481.97'], ['1675389816', '2462.33'], ['1675389852', '0.00'], ['1675389888', '4183.94'], ['1675389924', '0.00'], ['1675389960', '677.81'], ['1675389996', '1103.31'], ['1675390032', '0.00'], ['1675390068', '851.08'], ['1675390104', '0.00'], ['1675390140', '659.33'], ['1675390176', '936.56'], ['1675390212', '0.00'], ['1675390248', '835.78'], ['1675390284', '0.00'], ['1675390320', '296.28'], ['1675390356', '1205.39'], ['1675390392', '0.00'], ['1675390428', '3288.14'], ['1675390464', '0.00'], ['1675390500', '471.14'], ['1675390536', '1577.00'], ['1675390572', '0.00'], ['1675390608', '1645.36'], ['1675390644', '0.00'], ['1675390680', '1390.75'], ['1675390716', '1612.75'], ['1675390752', '0.00'], ['1675390788', '880.92'], ['1675390824', '0.00'], ['1675390860', '1573.47'], ['1675390896', '1809.56'], ['1675390932', '0.00'], ['1675390968', '1847.53'], ['1675391004', '0.00'], ['1675391040', '2160.33'], ['1675391076', '3126.36'], ['1675391112', '0.00'], ['1675391148', '1166.14'], ['1675391184', '0.00'], ['1675391220', '1166.81'], ['1675391256', '538.75'], ['1675391292', '0.00'], ['1675391328', '681.00'], ['1675391364', '0.00'], ['1675391400', '2580.83'], ['1675391436', '1693.17'], ['1675391472', '0.00'], ['1675391508', '695.89'], ['1675391544', '0.00'], ['1675391580', '1395.19'], ['1675391616', '1920.39'], ['1675391652', '0.00'], ['1675391688', '679.08'], ['1675391724', '0.00']],
analysis: {
avg: '0.00',
max: '0.00',
min: '0.00',
p95: '3126.36'
}
},
totalPacketsRate: {
values: [['1675388124', '0.00'], ['1675388160', '2218.36'], ['1675388196', '910.28'], ['1675388232', '0.00'], ['1675388268', '1226.33'], ['1675388304', '0.00'], ['1675388340', '3918.44'], ['1675388376', '1463.44'], ['1675388412', '0.00'], ['1675388448', '3588.86'], ['1675388484', '0.00'], ['1675388520', '1414.22'], ['1675388556', '974.22'], ['1675388592', '0.00'], ['1675388628', '825.58'], ['1675388664', '0.00'], ['1675388700', '1717.14'], ['1675388736', '731.61'], ['1675388772', '0.00'], ['1675388808', '827.00'], ['1675388844', '0.00'], ['1675388880', '1456.78'], ['1675388916', '1582.11'], ['1675388952', '0.00'], ['1675388988', '1593.53'], ['1675389024', '0.00'], ['1675389060', '1998.39'], ['1675389096', '1152.64'], ['1675389132', '0.00'], ['1675389168', '1815.25'], ['1675389204', '0.00'], ['1675389240', '750.61'], ['1675389276', '2657.61'], ['1675389312', '0.00'], ['1675389348', '530.86'], ['1675389384', '0.00'], ['1675389420', '2025.08'], ['1675389456', '845.56'], ['1675389492', '0.00'], ['1675389528', '240.97'], ['1675389564', '0.00'], ['1675389600', '1017.67'], ['1675389636', '6476.50'], ['1675389672', '0.00'], ['1675389708', '2147.86'], ['1675389744', '0.00'], ['1675389780', '549.44'], ['1675389816', '2498.28'], ['1675389852', '0.00'], ['1675389888', '4206.39'], ['1675389924', '0.00'], ['1675389960', '723.44'], ['1675389996', '1136.11'], ['1675390032', '0.00'], ['1675390068', '888.81'], ['1675390104', '0.00'], ['1675390140', '703.03'], ['1675390176', '1165.53'], ['1675390212', '0.00'], ['1675390248', '1228.47'], ['1675390284', '0.00'], ['1675390320', '351.61'], ['1675390356', '1252.83'], ['1675390392', '0.00'], ['1675390428', '3394.19'], ['1675390464', '0.00'], ['1675390500', '518.72'], ['1675390536', '1641.56'], ['1675390572', '0.00'], ['1675390608', '1681.31'], ['1675390644', '0.00'], ['1675390680', '1408.06'], ['1675390716', '1708.22'], ['1675390752', '0.00'], ['1675390788', '1518.92'], ['1675390824', '0.00'], ['1675390860', '1812.58'], ['1675390896', '2100.44'], ['1675390932', '0.00'], ['1675390968', '1976.83'], ['1675391004', '0.00'], ['1675391040', '2369.17'], ['1675391076', '3191.67'], ['1675391112', '0.00'], ['1675391148', '1208.31'], ['1675391184', '0.00'], ['1675391220', '1184.75'], ['1675391256', '553.08'], ['1675391292', '0.00'], ['1675391328', '687.31'], ['1675391364', '0.00'], ['1675391400', '2643.67'], ['1675391436', '1695.69'], ['1675391472', '0.00'], ['1675391508', '732.94'], ['1675391544', '0.00'], ['1675391580', '1505.19'], ['1675391616', '2068.92'], ['1675391652', '0.00'], ['1675391688', '1262.72'], ['1675391724', '0.00']],
analysis: {
avg: '0.00',
max: '0.00',
min: '0.00',
p95: '3191.67'
}
}
}]
}
}
},
data2: {
data: {
status: 200,
code: 200,
data: {
resultType: 'table',
result: [{
totalBytes: '4426409159',
totalBitsRate: 983646480,
totalPackets: '3324302',
establishLatencyMs: 9294.89,
httpResponseLatency: 154.2884,
sslConLatency: 90,
tcpLostlenPercent: 0.69,
pktRetransPercent: 0.165
}]
}
}
}
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,28 +1,38 @@
import NetworkOverviewDdosDetection from '@/views/charts2/charts/networkOverview/NetworkOverviewDdosDetection'
import { mount } from '@vue/test-utils'
import axios from 'axios'
import { mockData } from './mockData/NetworkOverviewDdosDetection'
const mockGet = {
data: { status: 200, code: 200, queryKey: 'dec6723e173e8fa2b00917dc597bfb27', success: true, message: null, statistics: { elapsed: 0, rows_read: 2, result_size: 58, result_rows: 1 }, job: null, formatType: 'json', meta: [{ name: 'attack_event_count', type: 'long', category: 'Metric' }, { name: 'attacker_count', type: 'long', category: 'Metric' }, { name: 'victim_count', type: 'long', category: 'Metric' }], data: { resultType: 'object', result: [{ attackEventCount: 1200000, attackerCount: 2687878, victimCount: 36676767 }] }, originalUrl: 'http://192.168.44.55:9999?query=SELECT%20COUNT%28*%29%20AS%20attack_event_count%2C%20COUNT%28DISTINCT%28offender_ip%29%29%20AS%20attacker_count%2C%20COUNT%28DISTINCT%28victim_ip%29%29%20AS%20victim_count%20FROM%20security_event%20WHERE%20start_time%20%3E%3D%201675043912%20AND%20start_time%20%3C%201675047512%20AND%20security_type%20%3D%20%27ddos%27&format=json&option=real-time', msg: 'OK' }
}
const mockGet = mockData.common
const timeFilter = {
dateRangeValue: -1,
startTime: 1675043912,
endTime: 1675047512
}
let wrapper = null
describe('views/charts2/charts/networkOverview/NetworkOverviewDdosDetection.vue测试', () => {
test('攻击、受害、攻击数事件ddos检测图', async () => {
/**
* 进行axios请求并挂载vue实例
* @param data
*/
function axiosPostAndMounted (data) {
require('vue-router').useRoute.mockReturnValue({ query: {} })
// 模拟 axios 返回数据
axios.get.mockResolvedValue(mockGet)
const _data = data || mockGet
axios.get.mockResolvedValue(_data)
// 加载vue组件获得实例
const wrapper = mount(NetworkOverviewDdosDetection, {
wrapper = mount(NetworkOverviewDdosDetection, {
propsData: {
timeFilter
}
})
}
describe('views/charts2/charts/networkOverview/NetworkOverviewDdosDetection.vue测试', () => {
test('攻击、受害、攻击数事件ddos检测图', async () => {
axiosPostAndMounted()
const attackEventCount = wrapper.get('[test-id="attackEventCount"]')
const attackerCount = wrapper.get('[test-id="attackerCount"]')
const victimCount = wrapper.get('[test-id="victimCount"]')
@@ -34,4 +44,27 @@ describe('views/charts2/charts/networkOverview/NetworkOverviewDdosDetection.vue
resolve()
}, 200))
})
test('攻击、受害、攻击数事件ddos检测图无数据', async () => {
axiosPostAndMounted(mockData.empty)
await new Promise(resolve => setTimeout(() => {
const noData = wrapper.get('[test-id="noData"]')
expect(noData.text()).toBe('npm.noData')
resolve()
}, 200))
})
test('攻击、受害、攻击数事件ddos检测图数据为0或极大值', async () => {
axiosPostAndMounted(mockData.boundary)
await new Promise(resolve => setTimeout(() => {
const attackEventCount = wrapper.get('[test-id="attackEventCount"]')
const attackerCount = wrapper.get('[test-id="attackerCount"]')
const victimCount = wrapper.get('[test-id="victimCount"]')
expect(attackEventCount.text()).toEqual('120.00 G')
expect(attackerCount.text()).toEqual('0')
expect(victimCount.text()).toEqual('3.67 T')
resolve()
}, 200))
})
})

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,32 @@
export const mockData = {
common: {
data: { status: 200, code: 200, queryKey: 'dec6723e173e8fa2b00917dc597bfb27', success: true, message: null, statistics: { elapsed: 0, rows_read: 2, result_size: 58, result_rows: 1 }, job: null, formatType: 'json', meta: [{ name: 'attack_event_count', type: 'long', category: 'Metric' }, { name: 'attacker_count', type: 'long', category: 'Metric' }, { name: 'victim_count', type: 'long', category: 'Metric' }], data: { resultType: 'object', result: [{ attackEventCount: 1200000, attackerCount: 2687878, victimCount: 36676767 }] }, originalUrl: 'http://192.168.44.55:9999?query=SELECT%20COUNT%28*%29%20AS%20attack_event_count%2C%20COUNT%28DISTINCT%28offender_ip%29%29%20AS%20attacker_count%2C%20COUNT%28DISTINCT%28victim_ip%29%29%20AS%20victim_count%20FROM%20security_event%20WHERE%20start_time%20%3E%3D%201675043912%20AND%20start_time%20%3C%201675047512%20AND%20security_type%20%3D%20%27ddos%27&format=json&option=real-time', msg: 'OK' }
},
empty: {
data: {
status: 200,
code: 200,
data: {
resultType: 'table',
result: []
},
msg: 'OK'
}
},
boundary: {
data: {
status: 200,
code: 200,
data: {
resultType: 'object',
result: [
{
attackEventCount: 120000077777,
attackerCount: 0,
victimCount: 3667676700000
}
]
}
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -2,6 +2,10 @@ import NpmAppEventTable from '@/views/charts2/charts/npm/NpmAppEventTable'
import { mount } from '@vue/test-utils'
import axios from 'axios'
import ElementPlus from 'element-plus'
import { mockData } from './mockData/NpmAppEventByTable'
let wrapper = null
const mockGet = mockData.common.data
const timeFilter = {
dateRangeValue: -1,
@@ -9,15 +13,18 @@ const timeFilter = {
endTime: 1675731457
}
const mockGet = { data: { status: 200, code: 200, queryKey: '88eeb92e0ddb40c0327db494cfe5c74c', success: true, message: null, statistics: { elapsed: 0, rows_read: 2, result_size: 752, result_rows: 10 }, job: null, formatType: 'json', meta: [{ name: 'app_name', type: 'string', category: 'Dimension' }, { name: 'event_severity', type: 'string', category: 'Dimension' }, { name: 'event_type', type: 'string', category: 'Dimension' }, { name: 'count', type: 'long', category: 'Metric' }], data: { resultType: 'table', result: [{ appName: 'youku', eventSeverity: 'info', eventType: 'http error', count: 6 }, { appName: 'uplive', eventSeverity: 'critical', eventType: 'http error', count: 5 }, { appName: 'youku', eventSeverity: 'low', eventType: 'http error', count: 4 }, { appName: 'apple_hls', eventSeverity: 'info', eventType: 'http error', count: 3 }, { appName: 'apple_hls', eventSeverity: 'low', eventType: 'http error', count: 3 }, { appName: 'apple_hls', eventSeverity: 'medium', eventType: 'http error', count: 2 }, { appName: 'uplive', eventSeverity: 'high', eventType: 'http error', count: 2 }, { appName: 'windows_update', eventSeverity: 'medium', eventType: 'http error', count: 2 }, { appName: 'apple_hls', eventSeverity: 'critical', eventType: 'http error', count: 1 }, { appName: 'cloudflare', eventSeverity: 'info', eventType: 'http error', count: 1 }] }, originalUrl: 'http://192.168.44.55:9999?query=SELECT%20app_name%20AS%20app_name%2C%20event_severity%20AS%20event_severity%2C%20event_type%20AS%20event_type%2C%20COUNT%28*%29%20AS%20count%20FROM%20performance_event%20WHERE%20start_time%20%3E%3D%201675580110%20AND%20end_time%20%3C%201675752910%20AND%20entity_type%20%3D%20%27app%27%20GROUP%20BY%20app_name%2Cevent_severity%2Cevent_type%20ORDER%20BY%20count%20DESC%20%20LIMIT%2010%20&format=json&option=real-time', msg: 'OK' } }
describe('views/charts2/charts/npm/NpmAppEventTable.vue测试', () => {
test('Npm 事件APP事件信息表格 严重程度色块验证', async () => {
/**
* 进行axios请求并挂载vue实例
* @param data
*/
function axiosPostAndMounted (data) {
require('vue-router').useRoute.mockReturnValue({ query: {} })
const _data = data || mockGet
// 模拟 axios 数据
axios.get.mockResolvedValue(mockGet)
axios.get.mockResolvedValue(_data)
// 加载vue组件获得实例
const wrapper = mount(NpmAppEventTable, {
wrapper = mount(NpmAppEventTable, {
global: {
plugins: [ElementPlus]
},
@@ -25,6 +32,11 @@ describe('views/charts2/charts/npm/NpmAppEventTable.vue测试', () => {
timeFilter
}
})
}
describe('views/charts2/charts/npm/NpmAppEventTable.vue测试', () => {
test('Npm 事件APP事件信息表格 严重程度色块验证', async () => {
axiosPostAndMounted()
await new Promise(resolve => setTimeout(() => {
// critical
@@ -96,18 +108,7 @@ describe('views/charts2/charts/npm/NpmAppEventTable.vue测试', () => {
}, 200))
})
test('Npm 事件APP事件信息表格 数据验证(应用数据列)', async () => {
require('vue-router').useRoute.mockReturnValue({ query: {} })
// 模拟 axios 数据
axios.get.mockResolvedValue(mockGet)
// 加载vue组件获得实例
const wrapper = mount(NpmAppEventTable, {
global: {
plugins: [ElementPlus]
},
propsData: {
timeFilter
}
})
axiosPostAndMounted()
await new Promise(resolve => setTimeout(() => {
const textNode0 = wrapper.find('[test-id="appName0"]')
@@ -136,18 +137,7 @@ describe('views/charts2/charts/npm/NpmAppEventTable.vue测试', () => {
}, 200))
})
test('Npm 事件APP事件信息表格 数据验证(严重程度数据列)', async () => {
require('vue-router').useRoute.mockReturnValue({ query: {} })
// 模拟 axios 数据
axios.get.mockResolvedValue(mockGet)
// 加载vue组件获得实例
const wrapper = mount(NpmAppEventTable, {
global: {
plugins: [ElementPlus]
},
propsData: {
timeFilter
}
})
axiosPostAndMounted()
await new Promise(resolve => setTimeout(() => {
const textNode0 = wrapper.find('[test-id="eventSeverity0"]')
@@ -176,18 +166,7 @@ describe('views/charts2/charts/npm/NpmAppEventTable.vue测试', () => {
}, 200))
})
test('Npm 事件APP事件信息表格 数据验证(事件类型数据列)', async () => {
require('vue-router').useRoute.mockReturnValue({ query: {} })
// 模拟 axios 数据
axios.get.mockResolvedValue(mockGet)
// 加载vue组件获得实例
const wrapper = mount(NpmAppEventTable, {
global: {
plugins: [ElementPlus]
},
propsData: {
timeFilter
}
})
axiosPostAndMounted()
await new Promise(resolve => setTimeout(() => {
const textNode0 = wrapper.find('[test-id="eventType0"]')
@@ -216,18 +195,7 @@ describe('views/charts2/charts/npm/NpmAppEventTable.vue测试', () => {
}, 200))
})
test('Npm 事件APP事件信息表格 数据验证(事件数量数据列)', async () => {
require('vue-router').useRoute.mockReturnValue({ query: {} })
// 模拟 axios 数据
axios.get.mockResolvedValue(mockGet)
// 加载vue组件获得实例
const wrapper = mount(NpmAppEventTable, {
global: {
plugins: [ElementPlus]
},
propsData: {
timeFilter
}
})
axiosPostAndMounted()
await new Promise(resolve => setTimeout(() => {
const textNode0 = wrapper.find('[test-id="count0"]')
@@ -255,4 +223,13 @@ describe('views/charts2/charts/npm/NpmAppEventTable.vue测试', () => {
resolve()
}, 200))
})
test('Npm 事件APP事件信息表格 无数据', async () => {
axiosPostAndMounted(mockData.empty.data)
await new Promise(resolve => setTimeout(() => {
const noData = wrapper.get('[test-id="noData"]')
expect(noData.text()).toBe('npm.noData')
resolve()
}, 200))
})
})

View File

@@ -11,6 +11,7 @@ const timeFilter = {
startTime: 1673244000,
endTime: 1673247600
}
/**
* 进行axios请求并挂载vue实例
* @param data

View File

@@ -1,25 +1,35 @@
import NpmEventsHeader from '@/views/charts2/charts/npm/NpmEventsHeader'
import { mount } from '@vue/test-utils'
import axios from 'axios'
import { mockData } from './mockData/NpmEventsHeader'
// 模拟数据
const chartData = {
data: { status: 200, code: 200, queryKey: '6480498979f7501d822572ebeb9e9665', success: true, message: null, statistics: { elapsed: 0, rows_read: 3, result_size: 167, result_rows: 5 }, job: null, formatType: 'json', meta: [{ name: 'event_severity', type: 'string', category: 'Dimension' }, { name: 'count', type: 'long', category: 'Metric' }], data: { resultType: 'table', result: [{ eventSeverity: 'critical', count: 322334 }, { eventSeverity: 'high', count: 1111 }, { eventSeverity: 'info', count: 122222 }, { eventSeverity: 'low', count: 14456678 }, { eventSeverity: 'medium', count: 2000000 }] }, originalUrl: 'http://192.168.44.55:9999?query=SELECT%20event_severity%20AS%20event_severity%2C%20COUNT%28*%29%20AS%20count%20FROM%20performance_event%20WHERE%20start_time%20%3E%3D%201675026686%20AND%20end_time%20%3C%201675048286%20GROUP%20BY%20event_severity&format=json&option=real-time', msg: 'OK' }
}
const chartData = mockData.common.data
// type
const type = 'severity'
let wrapper = null
describe('views/charts2/charts/npm/NpmEventsHeader.vue测试', () => {
test('严重等级各等级个数npm event 严重等级单值', async () => {
/**
* 进行axios请求并挂载vue实例
* @param data
*/
function axiosPostAndMounted (data) {
require('vue-router').useRoute.mockReturnValue({ query: {} })
// 模拟 axios 返回数据
axios.get.mockResolvedValue(chartData)
const _data = data || chartData
// 模拟 axios 数据
axios.get.mockResolvedValue(_data)
// 加载vue组件获得实例
const wrapper = mount(NpmEventsHeader, {
wrapper = mount(NpmEventsHeader, {
propsData: {
type
}
})
}
describe('views/charts2/charts/npm/NpmEventsHeader.vue测试', () => {
test('严重等级各等级个数npm event 严重等级单值', async () => {
axiosPostAndMounted()
// 严重等级
const severity0 = wrapper.get('[test-id="severity0"]')
const severity1 = wrapper.get('[test-id="severity1"]')
@@ -51,4 +61,40 @@ describe('views/charts2/charts/npm/NpmEventsHeader.vue测试', () => {
resolve()
}, 200))
})
test('请求无数据', async () => {
axiosPostAndMounted(mockData.empty.data)
// 各等级个数
const total0 = wrapper.get('[test-id="total0"]')
const total1 = wrapper.get('[test-id="total1"]')
const total2 = wrapper.get('[test-id="total2"]')
const total3 = wrapper.get('[test-id="total3"]')
const total4 = wrapper.get('[test-id="total4"]')
await new Promise(resolve => setTimeout(() => {
expect(total0.text()).toEqual('-')
expect(total1.text()).toEqual('-')
expect(total2.text()).toEqual('-')
expect(total3.text()).toEqual('-')
expect(total4.text()).toEqual('-')
resolve()
}, 200))
})
test('数据为0或极大', async () => {
axiosPostAndMounted(mockData.boundary.data)
// 各等级个数
const total0 = wrapper.get('[test-id="total0"]')
const total1 = wrapper.get('[test-id="total1"]')
const total2 = wrapper.get('[test-id="total2"]')
const total3 = wrapper.get('[test-id="total3"]')
const total4 = wrapper.get('[test-id="total4"]')
await new Promise(resolve => setTimeout(() => {
expect(total0.text()).toEqual('0')
expect(total1.text()).toEqual('0')
expect(total2.text()).toEqual('0')
expect(total3.text()).toEqual('14,456,678')
expect(total4.text()).toEqual('1,222,225,432,456,789')
resolve()
}, 200))
})
})

File diff suppressed because one or more lines are too long

View File

@@ -2,45 +2,32 @@ import NpmRecentEvents from '@/views/charts2/charts/npm/NpmRecentEvents'
import { mount } from '@vue/test-utils'
import axios from 'axios'
import ElementPlus from 'element-plus'
import { mockData } from './mockData/NpmRecentEvents'
// 未下钻
const mockGet = {
data: { status: 200, code: 200, queryKey: '68d8aa5867b08b926b5bd38c36add9e5', success: true, message: null, statistics: { elapsed: 0, rows_read: 2, result_size: 550, result_rows: 5 }, job: null, formatType: 'json', meta: [{ name: 'event_id', type: 'long', category: 'Metric' }, { name: 'event_severity', type: 'string', category: 'Metric' }, { name: 'event_key', type: 'string', category: 'Metric' }, { name: 'event_type', type: 'string', category: 'Metric' }], data: { resultType: 'table', result: [{ eventId: 1173511643475208200, eventSeverity: 'critical', eventKey: '114.114.114.114 dns error', eventType: 'dns error' }, { eventId: 1173504415263352800, eventSeverity: 'high', eventKey: '116.178.78.241 http error', eventType: 'http error' }, { eventId: 1173492761289025500, eventSeverity: 'medium', eventKey: '223.6.6.6 dns error', eventType: 'dns error' }, { eventId: 1173489002890651600, eventSeverity: 'low', eventKey: '114.114.114.114 dns error', eventType: 'dns error' }, { eventId: 1173482380537620500, eventSeverity: 'info', eventKey: '1.1.1.2 dns error', eventType: 'http error' }, { eventId: 1173482380537620500, eventSeverity: 'critical', eventKey: '1.1.1.2 dns error', eventType: 'dns error' }] }, originalUrl: 'http://192.168.44.55:9999?query=SELECT%20event_id%20AS%20event_id%2Cevent_severity%20AS%20event_severity%2C%20event_key%20AS%20event_key%2C%20event_type%20AS%20event_type%20FROM%20performance_event%20WHERE%20start_time%20%3E%3D%201675227528%20AND%20end_time%20%3C%201675231128%20ORDER%20BY%20start_time%20DESC%20%20LIMIT%208%20&format=json&option=real-time', msg: 'OK' }
}
const mockGet = mockData.common.data1
// 下钻
const mockGet1 = {
data: { status: 200, code: 200, queryKey: 'fc0bd92bf3b48a37310d5c004d8b7a7b', success: true, message: null, statistics: { elapsed: 0, rows_read: 2, result_size: 689, result_rows: 7 }, job: null, formatType: 'json', meta: [{ name: 'event_id', type: 'long', category: 'Metric' }, { name: 'event_severity', type: 'string', category: 'Metric' }, { name: 'event_type', type: 'string', category: 'Metric' }, { name: 'start_time', type: 'long', category: 'Metric' }], data: { resultType: 'table', result: [{ eventId: 1132790825086844900, eventSeverity: 'critical', eventType: 'http error', startTime: 1672802700 }, { eventId: 1132132403379142700, eventSeverity: 'high', eventType: 'dns error', startTime: 1672763400 }, { eventId: 1131441760155689000, eventSeverity: 'low', eventType: 'dns error', startTime: 1672722300 }, { eventId: 1131411523384598500, eventSeverity: 'medium', eventType: 'http error', startTime: 1672720500 }, { eventId: 1131390214323789800, eventSeverity: 'info', eventType: 'dns error', startTime: 1672719300 }, { eventId: 1131306200132968400, eventSeverity: 'critical', eventType: 'http error', startTime: 1672714200 }] }, originalUrl: 'http://192.168.44.55:9999?query=SELECT%20event_id%20AS%20event_id%2Cevent_severity%20AS%20event_severity%2C%20event_type%20AS%20event_type%2C%20start_time%20AS%20start_time%20FROM%20performance_event%20WHERE%20start_time%20%3E%3D%201672675200%20AND%20start_time%20%3C%201677513600%20AND%20server_ip%20%3D%20%27116.178.236.216%27%20ORDER%20BY%20start_time%20DESC&format=json&option=real-time', msg: 'OK' }
}
const query = {
curTab: 'country',
dimensionType: 'ip',
fourthMenu: '116.178.214.84',
fourthPanel: '8',
networkOverviewBeforeTab: 'ip',
panelName: '116.178.214.84',
queryCondition: "common_client_ip='116.178.214.84' OR common_server_ip='116.178.214.84'",
t: '1675236779453',
tabIndex: '1',
tabOperationBeforeType: '',
tabOperationType: '4',
thirdMenu: 'network.ips',
thirdPanel: '12'
}
const mockGet1 = mockData.common.data2
const query = mockData.common.query
const timeFilter = {
dateRangeValue: -1,
startTime: 1675043912,
endTime: 1675047512
}
let wrapper = null
/**
* 进行axios请求并挂载vue实例
* @param data
* @param query
*/
function axiosPostAndMounted (data, query) {
const _query = query || {}
require('vue-router').useRoute.mockReturnValue({ query: _query })
const _data = data || mockGet
axios.get.mockResolvedValue(_data)
describe('views/charts2/charts/npm/NpmRecentEvents.vue测试', () => {
test('npm events 近期事件表格 未下钻', async () => {
require('vue-router').useRoute.mockReturnValue({ query: {} })
// 模拟 axios 返回数据
axios.get.mockResolvedValue(mockGet)
const wrapper = mount(NpmRecentEvents, {
wrapper = mount(NpmRecentEvents, {
propsData: {
timeFilter
},
@@ -48,6 +35,12 @@ describe('views/charts2/charts/npm/NpmRecentEvents.vue测试', () => {
plugins: [ElementPlus]
}
})
}
describe('views/charts2/charts/npm/NpmRecentEvents.vue测试', () => {
test('npm events 近期事件表格 未下钻', async () => {
axiosPostAndMounted()
await new Promise(resolve => setTimeout(() => {
const severity0 = wrapper.get('[test-id="eventSeverity-critical-0"]')
const severity1 = wrapper.get('[test-id="eventSeverity-high-1"]')
@@ -98,18 +91,8 @@ describe('views/charts2/charts/npm/NpmRecentEvents.vue测试', () => {
}, 200))
})
test('npm events 近期事件表格 下钻', async () => {
require('vue-router').useRoute.mockReturnValue({ query: query })
// 模拟 axios 返回数据
axios.get.mockResolvedValue(mockGet1)
axiosPostAndMounted(mockGet1, query)
const wrapper = mount(NpmRecentEvents, {
propsData: {
timeFilter
},
global: {
plugins: [ElementPlus]
}
})
await new Promise(resolve => setTimeout(() => {
const severity0 = wrapper.get('[test-id="eventSeverity-critical-0"]')
const severity1 = wrapper.get('[test-id="eventSeverity-high-1"]')
@@ -159,4 +142,13 @@ describe('views/charts2/charts/npm/NpmRecentEvents.vue测试', () => {
resolve()
}, 300))
})
test('npm events 近期事件表格 未下钻、未下钻无数据', async () => {
axiosPostAndMounted(mockData.empty.data)
await new Promise(resolve => setTimeout(() => {
const noData = wrapper.get('[test-id="noData"]')
expect(noData.text()).toBe('npm.thereNoEvents')
resolve()
}, 200))
})
})

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,20 @@
export const mockData = {
common: {
data: {
data: { status: 200, code: 200, queryKey: '88eeb92e0ddb40c0327db494cfe5c74c', success: true, message: null, statistics: { elapsed: 0, rows_read: 2, result_size: 752, result_rows: 10 }, job: null, formatType: 'json', meta: [{ name: 'app_name', type: 'string', category: 'Dimension' }, { name: 'event_severity', type: 'string', category: 'Dimension' }, { name: 'event_type', type: 'string', category: 'Dimension' }, { name: 'count', type: 'long', category: 'Metric' }], data: { resultType: 'table', result: [{ appName: 'youku', eventSeverity: 'info', eventType: 'http error', count: 6 }, { appName: 'uplive', eventSeverity: 'critical', eventType: 'http error', count: 5 }, { appName: 'youku', eventSeverity: 'low', eventType: 'http error', count: 4 }, { appName: 'apple_hls', eventSeverity: 'info', eventType: 'http error', count: 3 }, { appName: 'apple_hls', eventSeverity: 'low', eventType: 'http error', count: 3 }, { appName: 'apple_hls', eventSeverity: 'medium', eventType: 'http error', count: 2 }, { appName: 'uplive', eventSeverity: 'high', eventType: 'http error', count: 2 }, { appName: 'windows_update', eventSeverity: 'medium', eventType: 'http error', count: 2 }, { appName: 'apple_hls', eventSeverity: 'critical', eventType: 'http error', count: 1 }, { appName: 'cloudflare', eventSeverity: 'info', eventType: 'http error', count: 1 }] }, originalUrl: 'http://192.168.44.55:9999?query=SELECT%20app_name%20AS%20app_name%2C%20event_severity%20AS%20event_severity%2C%20event_type%20AS%20event_type%2C%20COUNT%28*%29%20AS%20count%20FROM%20performance_event%20WHERE%20start_time%20%3E%3D%201675580110%20AND%20end_time%20%3C%201675752910%20AND%20entity_type%20%3D%20%27app%27%20GROUP%20BY%20app_name%2Cevent_severity%2Cevent_type%20ORDER%20BY%20count%20DESC%20%20LIMIT%2010%20&format=json&option=real-time', msg: 'OK' }
}
},
empty: {
data: {
data: {
status: 200,
code: 200,
data: {
resultType: 'table',
result: []
},
msg: 'OK'
}
}
}
}

View File

@@ -0,0 +1,48 @@
export const mockData = {
common: {
data: {
data: { status: 200, code: 200, queryKey: '6480498979f7501d822572ebeb9e9665', success: true, message: null, statistics: { elapsed: 0, rows_read: 3, result_size: 167, result_rows: 5 }, job: null, formatType: 'json', meta: [{ name: 'event_severity', type: 'string', category: 'Dimension' }, { name: 'count', type: 'long', category: 'Metric' }], data: { resultType: 'table', result: [{ eventSeverity: 'critical', count: 322334 }, { eventSeverity: 'high', count: 1111 }, { eventSeverity: 'info', count: 122222 }, { eventSeverity: 'low', count: 14456678 }, { eventSeverity: 'medium', count: 2000000 }] }, originalUrl: 'http://192.168.44.55:9999?query=SELECT%20event_severity%20AS%20event_severity%2C%20COUNT%28*%29%20AS%20count%20FROM%20performance_event%20WHERE%20start_time%20%3E%3D%201675026686%20AND%20end_time%20%3C%201675048286%20GROUP%20BY%20event_severity&format=json&option=real-time', msg: 'OK' }
}
},
empty: {
data: {
data: {
status: 200,
code: 200,
data: {
resultType: 'table',
result: []
},
msg: 'OK'
}
}
},
boundary: {
data: {
data: {
status: 200,
code: 200,
data: {
resultType: 'table',
result: [
{
eventSeverity: 'critical',
count: 0
}, {
eventSeverity: 'high',
count: 0
}, {
eventSeverity: 'info',
count: 1222225432456789
}, {
eventSeverity: 'low',
count: 14456678
}, {
eventSeverity: 'medium',
count: 0
}]
}
}
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,66 @@
export const mockData = {
common: {
data1: {
data: { status: 200, code: 200, queryKey: '68d8aa5867b08b926b5bd38c36add9e5', success: true, message: null, statistics: { elapsed: 0, rows_read: 2, result_size: 550, result_rows: 5 }, job: null, formatType: 'json', meta: [{ name: 'event_id', type: 'long', category: 'Metric' }, { name: 'event_severity', type: 'string', category: 'Metric' }, { name: 'event_key', type: 'string', category: 'Metric' }, { name: 'event_type', type: 'string', category: 'Metric' }], data: { resultType: 'table', result: [{ eventId: 1173511643475208200, eventSeverity: 'critical', eventKey: '114.114.114.114 dns error', eventType: 'dns error' }, { eventId: 1173504415263352800, eventSeverity: 'high', eventKey: '116.178.78.241 http error', eventType: 'http error' }, { eventId: 1173492761289025500, eventSeverity: 'medium', eventKey: '223.6.6.6 dns error', eventType: 'dns error' }, { eventId: 1173489002890651600, eventSeverity: 'low', eventKey: '114.114.114.114 dns error', eventType: 'dns error' }, { eventId: 1173482380537620500, eventSeverity: 'info', eventKey: '1.1.1.2 dns error', eventType: 'http error' }, { eventId: 1173482380537620500, eventSeverity: 'critical', eventKey: '1.1.1.2 dns error', eventType: 'dns error' }] }, originalUrl: 'http://192.168.44.55:9999?query=SELECT%20event_id%20AS%20event_id%2Cevent_severity%20AS%20event_severity%2C%20event_key%20AS%20event_key%2C%20event_type%20AS%20event_type%20FROM%20performance_event%20WHERE%20start_time%20%3E%3D%201675227528%20AND%20end_time%20%3C%201675231128%20ORDER%20BY%20start_time%20DESC%20%20LIMIT%208%20&format=json&option=real-time', msg: 'OK' }
},
data2: {
data: { status: 200, code: 200, queryKey: 'fc0bd92bf3b48a37310d5c004d8b7a7b', success: true, message: null, statistics: { elapsed: 0, rows_read: 2, result_size: 689, result_rows: 7 }, job: null, formatType: 'json', meta: [{ name: 'event_id', type: 'long', category: 'Metric' }, { name: 'event_severity', type: 'string', category: 'Metric' }, { name: 'event_type', type: 'string', category: 'Metric' }, { name: 'start_time', type: 'long', category: 'Metric' }], data: { resultType: 'table', result: [{ eventId: 1132790825086844900, eventSeverity: 'critical', eventType: 'http error', startTime: 1672802700 }, { eventId: 1132132403379142700, eventSeverity: 'high', eventType: 'dns error', startTime: 1672763400 }, { eventId: 1131441760155689000, eventSeverity: 'low', eventType: 'dns error', startTime: 1672722300 }, { eventId: 1131411523384598500, eventSeverity: 'medium', eventType: 'http error', startTime: 1672720500 }, { eventId: 1131390214323789800, eventSeverity: 'info', eventType: 'dns error', startTime: 1672719300 }, { eventId: 1131306200132968400, eventSeverity: 'critical', eventType: 'http error', startTime: 1672714200 }] }, originalUrl: 'http://192.168.44.55:9999?query=SELECT%20event_id%20AS%20event_id%2Cevent_severity%20AS%20event_severity%2C%20event_type%20AS%20event_type%2C%20start_time%20AS%20start_time%20FROM%20performance_event%20WHERE%20start_time%20%3E%3D%201672675200%20AND%20start_time%20%3C%201677513600%20AND%20server_ip%20%3D%20%27116.178.236.216%27%20ORDER%20BY%20start_time%20DESC&format=json&option=real-time', msg: 'OK' }
},
query: {
curTab: 'country',
dimensionType: 'ip',
fourthMenu: '116.178.214.84',
fourthPanel: '8',
networkOverviewBeforeTab: 'ip',
panelName: '116.178.214.84',
queryCondition: "common_client_ip='116.178.214.84' OR common_server_ip='116.178.214.84'",
t: '1675236779453',
tabIndex: '1',
tabOperationBeforeType: '',
tabOperationType: '4',
thirdMenu: 'network.ips',
thirdPanel: '12'
}
},
empty: {
data: {
data: {
status: 200,
code: 200,
data: {
resultType: 'table',
result: []
},
msg: 'OK'
}
}
},
boundary: {
data: {
data: {
status: 200,
code: 200,
data: {
resultType: 'table',
result: [
{
eventSeverity: 'critical',
count: 0
}, {
eventSeverity: 'high',
count: 0
}, {
eventSeverity: 'info',
count: 1222225432456789
}, {
eventSeverity: 'low',
count: 14456678
}, {
eventSeverity: 'medium',
count: 0
}]
}
}
}
}
}