压测数据:同样的计数,快了 6 倍 十一月中旬做网关的埋点统计改造,需要统计每个接口的调用次数和总耗时。我一开始用的 AtomicLong: private final Map<String, AtomicLong> counters = new ConcurrentHashMap<>(); pu