long start = System.currentTimeMillis();
List<String> files=Files.readAllLines(paths);
// byte[] bytes = Files.readAllBytes(paths);
// String st=new String(bytes);
long end=System.currentTimeMillis();
System.out.println((end-start)/1000);
System.out.println(Runtime.getRuntime().freeMemory()/1024/1024);
System.out.println(Runtime.getRuntime().totalMemory()/1024/1024);
System.out.println(Runtime.getRuntime().maxMemory()/1024/1024);
java-获得虚拟机堆信息
最新推荐文章于 2024-07-10 03:38:32 发布