Skip to content

Commit 990ffe4

Browse files
committed
fix bug
1 parent 4a71742 commit 990ffe4

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/main.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,26 @@
44

55
int main(int argc, char* argv[])
66
try {
7-
boost::timer::cpu_timer timer;
87

98
// 解析命令行选项,读取配置文件
109
parse(argc, argv);
1110

12-
MINILOG(build_exe_timer_logger, timer.format(boost::timer::default_places, "%ws") << " PARSE ");
11+
boost::timer::cpu_timer stage_timer, total_timer;
1312

1413
// 扫描源文件,搜集信息
14+
stage_timer.start();
1515
collect();
16-
MINILOG(build_exe_timer_logger, timer.format(boost::timer::default_places, "%ws") << " COLLECT");
16+
MINILOG(build_exe_timer_logger, stage_timer.format(boost::timer::default_places, "%ws") << " COLLECT");
1717
if (collect_only) return 0;
1818

1919
// 构建
20+
stage_timer.start();
2021
bool success = build();
21-
MINILOG(build_exe_timer_logger, timer.format(boost::timer::default_places, "%ws") << " BUILD");
22+
MINILOG(build_exe_timer_logger, stage_timer.format(boost::timer::default_places, "%ws") << " BUILD");
2223
if (!success) return 0;
2324
if (build_only) return 0;
2425

25-
MINILOG(build_exe_timer_logger, timer.format(boost::timer::default_places, "%ws") << " TOTAL = PARSE + COLLECT + BUILD");
26+
MINILOG(build_exe_timer_logger, total_timer.format(boost::timer::default_places, "%ws") << " TOTAL = COLLECT + BUILD");
2627

2728
// 运行
2829
run();

0 commit comments

Comments
 (0)