public abstract class PerformanceTestUtils extends Object
@SafeVarargs @NonNull public static long[] execute(int sets, int times, Supplier<String>... suppliers)
sets - 运行几组测试times - 每组运行函数次数suppliers - 需比较性能的函数集,每个函数可以设置一个返回值,表示函数别名,会打印在控制台中@SafeVarargs @NonNull public static long[] execute(int times, Supplier<String>... suppliers)
times - 运行函数次数suppliers - 需比较性能的函数集,每个函数可以设置一个返回值,表示函数别名,会打印在控制台中public static long getCost(long startNanoTime)
startNanoTime - 起始纳秒数Copyright © 2021 EasyJ寮�婧愮ぞ鍖�. All rights reserved.