@Override
    public void pushSuccess(PushResult result) {
        MetricsMonitor.incrementPush();
        MetricsMonitor.incrementPushCost(result.getAllCost());
        MetricsMonitor.compareAndSetMaxPushCost(result.getAllCost());
        if (null == result.getData().getHosts() || !result.getData().validate()) {
            MetricsMonitor.incrementEmptyPush();
        }
        if (isRpc(result.getSubscriber())) {
            NamingTpsMonitor.rpcPushSuccess(result.getSubscribeClientId(), result.getSubscriber().getIp());
        } else {
            NamingTpsMonitor.udpPushSuccess(result.getSubscribeClientId(), result.getSubscriber().getIp());
        }
    }
@Test
    void testPushSuccessForNoEmptyPush() {
        ArrayList<Instance> hosts = new ArrayList<>();
        hosts.add(instance);
        serviceInfo.setHosts(hosts);
        new NacosMonitorPushResultHook().pushSuccess(pushResult);
        assertEquals(1, MetricsMonitor.getTotalPushMonitor().get());
        assertEquals(0, MetricsMonitor.getEmptyPushMonitor().get());
        assertEquals(allCost, MetricsMonitor.getMaxPushCostMonitor().get());
    }