From ee45166765cd9eb50e92bd941645d02de87ef5f8 Mon Sep 17 00:00:00 2001 From: zzh Date: Wed, 5 Mar 2025 10:24:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E7=A8=BF=E7=89=88=E6=9C=AC=EF=BC=8C?= =?UTF-8?q?=E5=9C=A8=E8=AE=BA=E6=96=87=E6=8A=95=E5=87=BA=E4=B9=8B=E5=89=8D?= =?UTF-8?q?=E4=B8=8D=E6=94=B9=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/markdup/markdup.cpp | 6 +++--- src/util/profiling.cpp | 38 ++++++++++++++++++++------------------ src/util/profiling.h | 3 ++- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/src/markdup/markdup.cpp b/src/markdup/markdup.cpp index 432b617..e844315 100644 --- a/src/markdup/markdup.cpp +++ b/src/markdup/markdup.cpp @@ -57,7 +57,7 @@ static string getFileExtension(const string &filename) { // entrance of mark duplicates int MarkDuplicates() { - + PROF_START(whole_process); /* 初始化一些参数和变量*/ nsgv::gNameParsers.resize(nsgv::gMdArg.NUM_THREADS); for (auto &parser : nsgv::gNameParsers) @@ -154,8 +154,6 @@ int MarkDuplicates() { spdlog::info("{} optical reads found", opticalIdxQue.Size()); // spdlog::info("{} represent reads found", repIdxQue.Size()); - // return 0; - uint64_t bamIdx = 0; DupInfo dupIdx = dupIdxQue.Pop(); DupInfo repIdx = repIdxQue.Pop(); @@ -366,5 +364,7 @@ int MarkDuplicates() { sam_close(nsgv::gOutBamFp); sam_close(nsgv::gInBamFp); + PROF_END(gprof[GP_whole_process], whole_process); + return 0; } \ No newline at end of file diff --git a/src/util/profiling.cpp b/src/util/profiling.cpp index 7173483..17833a2 100644 --- a/src/util/profiling.cpp +++ b/src/util/profiling.cpp @@ -49,32 +49,34 @@ int DisplayProfiling(int nthread) { #ifdef SHOW_PERF fprintf(stderr, "\n"); - PRINT_GP(read_wait); - PRINT_GP(gen_wait); - PRINT_GP(sort_wait); - PRINT_GP(markdup_wait); - PRINT_GP(intersect_wait); + // PRINT_GP(read_wait); + // PRINT_GP(gen_wait); + // PRINT_GP(sort_wait); + // PRINT_GP(markdup_wait); + // PRINT_GP(intersect_wait); PRINT_GP(read); PRINT_GP(gen); PRINT_GP(sort); PRINT_GP(markdup); PRINT_GP(intersect); - PRINT_GP(merge_result); - PRINT_GP(sort_pair); - PRINT_GP(sort_frag); - PRINT_GP(markdup_pair); - PRINT_GP(markdup_frag); - PRINT_GP(merge_match); - PRINT_GP(merge_markdup); - PRINT_GP(merge_update); - PRINT_GP(merge_add); + // PRINT_GP(merge_result); + // PRINT_GP(sort_pair); + // PRINT_GP(sort_frag); + // PRINT_GP(markdup_pair); + // PRINT_GP(markdup_frag); + // PRINT_GP(merge_match); + // PRINT_GP(merge_markdup); + // PRINT_GP(merge_update); + // PRINT_GP(merge_add); PRINT_GP(markdup_all); - PRINT_GP(final_read); + // PRINT_GP(final_read); PRINT_GP(write); + PRINT_GP(whole_process); + + // PRINT_TP(gen, nthread); + // PRINT_TP(sort_frag, nthread); + // PRINT_TP(sort_pair, nthread); - PRINT_TP(gen, nthread); - PRINT_TP(sort_frag, nthread); - PRINT_TP(sort_pair, nthread); fprintf(stderr, "\n"); #endif diff --git a/src/util/profiling.h b/src/util/profiling.h index d4bddd6..8986d32 100644 --- a/src/util/profiling.h +++ b/src/util/profiling.h @@ -60,7 +60,8 @@ enum { GP_merge_add, GP_markdup_all, GP_final_read, - GP_write + GP_write, + GP_whole_process }; // THREAD enum { TP_0 = 0, TP_1, TP_2, TP_3, TP_4, TP_5, TP_6, TP_7, TP_8, TP_9, TP_10 };