From 85eb255cfa84f57680f7ea9844ac5ba947cd6589 Mon Sep 17 00:00:00 2001 From: Roman Malinovskyy Date: Tue, 20 Aug 2019 19:55:50 -0700 Subject: [PATCH] Log total HHAS retrieval time Summary: This diff ensures we log total hhas retrieval time no matter whether hhas handler is installed or not. In particular this diff fixes following problems: 1) If handler is installed but does not invoke `compile` lambda (e.g. gets data from cache) retrieval duration is not logged at all; 2) This also messes up `assemble_hhas` metric. As `statefulLogTime` was not invoked the `t` hasn't been updated since original `startTime`. As a result when `statefulLogTime("assemble_hhas");` is invoked it includes `g_hhas_handler` execution time into `assemble_hhas` metric. This is wrong. Reviewed By: ricklavoie Differential Revision: D16926989 fbshipit-source-id: 883e68c83aa740e04df5e3bc8a3457ca58d47c31 --- hphp/runtime/vm/extern-compiler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/hphp/runtime/vm/extern-compiler.cpp b/hphp/runtime/vm/extern-compiler.cpp index 5f32340d642..76f2f149625 100644 --- a/hphp/runtime/vm/extern-compiler.cpp +++ b/hphp/runtime/vm/extern-compiler.cpp @@ -402,6 +402,7 @@ struct ExternCompiler { } else { prog = compile(); } + t = logTime(log, startTime, "total_hhas_retrieval"); auto ue = assemble_string(prog.data(), prog.length(), -- 2.11.4.GIT