select (ifnull(sum(m.shouldBeCrossedDockQty), 0) - ifnull(sum(m.satisfiedCrossedDockQty), 0)) as preCrossStockSkuQty, count(m.docId) as preCrossStockTaskQty from wms.wms_ob_cross_dock m final prewhere m.createTime >= '2021-12-03 11:00:00' and m.createTime <= '2021-12-14 11:00:00' and m.warehouseNo = '279_1' and m.orderType = '10' and tenantCode = 'TC90230202' where m.deleted = 0 and m.deliveryDestination = '2' and m.shipmentOrderDeleted = 0 and m.status = 0
从上面 SQL 截图可以看出,查询待越库件数 & 待越库任务数,共读了 720817 行数据
selectcount(distinct m.orderNo) as preAssignedOrderQty from wms.wms_ob_assign_order m final prewhere
m.createTime >= '2021-12-03 11:00:00' and m.createTime <= '2021-12-14 11:00:00' and m.warehouseNo = '361_0' and tenantCode = 'TC90230202' where m.taskassignStatus = 0 and m.deliveryDestination = 2 and m.stopProductionFlag = 0 and m.deleted = 0 and m.orderType = 10
从上面 SQL 截图可以看出,查询集合任务信息 - 待分配订单,共读了 153118 行数据
selectminus(toInt32(ifnull(sum(m.locateQty), toDecimal64(0, 4))), toInt32(ifnull(sum(m.pickedQty), toDecimal64(0, 4)))) as prePickingSkuQty, count(distinct m.taskNo) as prePickingTaskQty from wms.wms_picking_task m final prewhere m.shipmentOrderCreateTime >= '2021-12-03 11:00:00' and m.shipmentOrderCreateTime <= '2021-12-14 11:00:00' and m.warehouseNo = '286_1' and tenantCode = 'TC90230202' where m.pickingTaskDeleted = 0 and m.deliveryDestination = 2 and m.pickLocalDetailDeleted = 0 and m.shipmentOrderDeleted = 0 and m.orderType = 10 and (m.operateStatus = 0or m.operateStatus = 1)
selectminus(toInt32(ifnull(sum(m.locateQty), toDecimal64(0, 4))), toInt32(ifnull(sum(m.pickedQty), toDecimal64(0, 4)))) as prePickingSkuQty, count(distinct m.taskNo) as prePickingTaskQty from wms.wms_picking_task m final prewhere m.shipmentOrderCreateTime >= '2021-12-03 11:00:00' and m.shipmentOrderCreateTime <= '2021-12-14 11:00:00' and m.warehouseNo = '279_1' and tenantCode = 'TC90230202' where m.pickingTaskDeleted = 0 and m.deliveryDestination = 2 and m.pickLocalDetailDeleted = 0 and m.shipmentOrderDeleted = 0 and m.orderType = 10 and (m.operateStatus = 0or m.operateStatus = 1)
selectifnull(sum(m.unTrackQty), 0) as unTrackQty from wms.wms_order_sku m final prewhere m.shipmentOrderCreateTime >= '2021-12-03 11:00:00' and m.shipmentOrderCreateTime <= '2021-12-14 11:00:00' and m.warehouseNo = '280_1' and m.orderType = '10' and m.deliveryDestination = '2' and tenantCode = 'TC90230202' where m.shipmentOrderDeleted <> '1' and m.ckDeliveryTaskDeleted <> '1' and m.ckDeliveryTaskDetailDeleted <> '1' and m.ckDeliveryTaskStatus in ('1','0','2')
从上面 SQL 截图可以看出,查询发货信息 - 待发货件数,共读了 99591 行数据
2 测试环境准备
为了尽可能发挥性能压测作用,性能压测环境应当尽可能同线上环境一致,所以我们使用了和线上一样的环境
3 采集工具准备
监控工具
http://origin.jd.com/ :监控 JVM,方法级别监控(提供秒级支持)
http://console.jex.jd.com/ :提供异常堆栈监控,火焰图监控、线程堆栈分析
http://x.devops.jdcloud.com/ :支持查看 clickhouse/Elasticsearch 数据库服务每个节点的 cpu 使用率
http://dashboard.fireeye.jdl.cn/ :监测应用服务器 cpu 使用率、内存使用率