Skip to content

Commit

Permalink
add cost time log
Browse files Browse the repository at this point in the history
  • Loading branch information
ltlovezh committed Jul 17, 2017
1 parent d0544fc commit c7386ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Binary file modified command/jar/ApkChannelPackage.jar
Binary file not shown.
9 changes: 9 additions & 0 deletions command/src/main/java/com/leon/channel/command/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ private static void generateV1ChannelApk(File baseApk, List<String> channelList,
System.out.println("baseApk : " + baseApk.getAbsolutePath() + " not have channel info , so can add a channel info");
}

long startTime = System.currentTimeMillis();
System.out.println("------ File " + apkName + " generate v1 channel apk , begin ------");

try {
Expand Down Expand Up @@ -167,6 +168,8 @@ private static void generateV1ChannelApk(File baseApk, List<String> channelList,
}

System.out.println("------ File " + apkName + " generate v1 channel apk , end ------");
long cost = System.currentTimeMillis() - startTime;
System.out.println("------ total " + channelList.size() + " channel apk , cost : " + cost + " ------");
}

/**
Expand Down Expand Up @@ -195,11 +198,14 @@ private static void generateV1ChannelApkMultiThread(File baseApk, List<String> c
System.out.println("baseApk : " + baseApk.getAbsolutePath() + " not have channel info , so can add a channel info");
}

long startTime = System.currentTimeMillis();
System.out.println("------ File " + apkName + " generate v1 channel apk , begin ------");
//多线程生成渠道包
ThreadManager.getInstance().generateV1Channel(baseApk, channelList, outputDir);
ThreadManager.getInstance().destory();
System.out.println("------ File " + apkName + " generate v1 channel apk , end ------");
long cost = System.currentTimeMillis() - startTime;
System.out.println("------ total " + channelList.size() + " channel apk , cost : " + cost + " ------");
}

/**
Expand All @@ -211,6 +217,7 @@ private static void generateV1ChannelApkMultiThread(File baseApk, List<String> c
*/
private static void generateV2ChannelApk(File baseApk, List<String> channelList, File outputDir) {
String apkName = baseApk.getName();
long startTime = System.currentTimeMillis();
System.out.println("------ File " + apkName + " generate v2 channel apk , begin ------");

try {
Expand Down Expand Up @@ -240,6 +247,8 @@ private static void generateV2ChannelApk(File baseApk, List<String> channelList,
}

System.out.println("------ File " + apkName + " generate v2 channel apk , end ------");
long cost = System.currentTimeMillis() - startTime;
System.out.println("------ total " + channelList.size() + " channel apk , cost : " + cost + " ------");
}

/**
Expand Down

0 comments on commit c7386ed

Please sign in to comment.