Skip to content

Commit

Permalink
Add running time to logger and minor improvement.
Browse files Browse the repository at this point in the history
  • Loading branch information
fcyu committed Jun 7, 2018
1 parent c713566 commit af07e84
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/proteomics/ECL2.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public class ECL2 {
public static boolean dev;

public static void main(String[] args) {
long startTime = System.nanoTime();

// Process inputs
if (args.length != 2) {
help();
Expand Down Expand Up @@ -72,6 +74,10 @@ public static void main(String[] args) {
(new File(dbName + "-shm")).delete();
}
}

double totalHour = (double) (System.nanoTime() - startTime) * 1e-9 / 3600;
logger.info("Running time: {} hours.", totalHour);
logger.info("Done!");
}

private ECL2(String parameter_path, String spectra_path, String dbName) throws Exception{
Expand Down Expand Up @@ -277,7 +283,6 @@ private ECL2(String parameter_path, String spectra_path, String dbName) throws E
allResult.putAll(intra_result);
saveTargetResult(allResult, build_index_obj.getProAnnotateMap(), spectra_path, cal_evalue, sqlPath);
}
logger.info("Done.");
}

private static void saveTargetResult(Map<String, CalFDR.Entry> result, Map<String, String> pro_annotate_map, String id_file_name, boolean cal_evalue, String sqlPath) throws IOException, SQLException, NullPointerException {
Expand Down

0 comments on commit af07e84

Please sign in to comment.