Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: tools/gn/command_gen.cc

Issue 1651113002: Use ElapsedTimer to measure VS files generation time in GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/command_gen.cc
diff --git a/tools/gn/command_gen.cc b/tools/gn/command_gen.cc
index f85a299b303d2fa89963c7fc21a0ccaaa04bc897..b4faaa59a5e5710f2b6fdc4fcb8a58134ca7c6a1 100644
--- a/tools/gn/command_gen.cc
+++ b/tools/gn/command_gen.cc
@@ -152,16 +152,14 @@ bool RunIdeWriter(const std::string& ide,
Builder* builder,
Err* err) {
if (ide == kSwitchIdeValueVs) {
- base::TimeTicks begin_vs_gen = base::TimeTicks::Now();
+ base::ElapsedTimer timer;
bool res =
VisualStudioWriter::RunAndWriteFiles(build_settings, builder, err);
if (res &&
!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kQuiet)) {
- OutputString(
- "Generating Visual Studio projects took " +
- base::Int64ToString(
- (base::TimeTicks::Now() - begin_vs_gen).InMilliseconds()) +
- "ms\n");
+ OutputString("Generating Visual Studio projects took " +
+ base::Int64ToString(timer.Elapsed().InMilliseconds()) +
+ "ms\n");
}
return res;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698