From 7d249808407588431f00424dbb2ca599cc9441c6 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 13 Nov 2020 11:37:50 -0800 Subject: HCFS: 1.5.4 --- other/java/unzip/src/main/java/com/example/test/Example.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'other/java/unzip/src') diff --git a/other/java/unzip/src/main/java/com/example/test/Example.java b/other/java/unzip/src/main/java/com/example/test/Example.java index 393ccb5ab..3d22329a8 100644 --- a/other/java/unzip/src/main/java/com/example/test/Example.java +++ b/other/java/unzip/src/main/java/com/example/test/Example.java @@ -17,9 +17,14 @@ public class Example { public static void main(String[] args) throws IOException { + long startTime = System.currentTimeMillis(); // 本地模式,速度很快 parseZip("/Users/chris/tmp/test.zip"); + long startTime2 = System.currentTimeMillis(); + + long localProcessTime = startTime2 - startTime; + // swfs读取,慢 SeaweedInputStream seaweedInputStream = new SeaweedInputStream( filerGrpcClient, @@ -29,6 +34,11 @@ public class Example { ); parseZip(seaweedInputStream); + long swProcessTime = System.currentTimeMillis() - startTime2; + + System.out.println("Local time: " + localProcessTime); + System.out.println("SeaweedFS time: " + swProcessTime); + } public static void parseZip(String filename) throws IOException { -- cgit v1.2.3