public static int hash(Client client) {
        if (!(client instanceof IpPortBasedClient)) {
            return 0;
        }
        return Objects.hash(client.getClientId(),
                client.getAllPublishedService().stream()
                        .map(s -> {
                            InstancePublishInfo ip = client.getInstancePublishInfo(s);
                            double weight = getWeight(ip);
                            Boolean enabled = getEnabled(ip);
                            String cluster = StringUtils.defaultIfBlank(ip.getCluster(), DEFAULT_CLUSTER_NAME);
                            return Objects.hash(
                                    s.getNamespace(),
                                    s.getGroup(),
                                    s.getName(),
                                    s.isEphemeral(),
                                    ip.getIp(),
                                    ip.getPort(),
                                    weight,
                                    ip.isHealthy(),
                                    enabled,
                                    cluster,
                                    ip.getExtendDatum()
                            );
                        })
                        .collect(Collectors.toSet()));
    }
@Test
    void performanceTestOfHash() {
        long start = System.nanoTime();
        for (int i = 0; i < N; i++) {
            DistroUtils.hash(client1);
        }
        System.out.printf("Distro Verify Hash Performance: %.2f ivk/ns\n", ((double) System.nanoTime() - start) / N);
    }