Reset callgrind stats after environment setup

This makes sure we just measure parse+typeck+lint time.
This commit is contained in:
Arseny Kapoulkine 2022-07-04 21:30:40 -07:00
parent 569f6e985a
commit 67b4326017

View file

@ -8,6 +8,10 @@
#include "FileUtils.h"
#ifdef CALLGRIND
#include <valgrind/callgrind.h>
#endif
LUAU_FASTFLAG(DebugLuauTimeTracing)
LUAU_FASTFLAG(LuauTypeMismatchModuleNameResolution)
@ -268,6 +272,10 @@ int main(int argc, char** argv)
Luau::registerBuiltinTypes(frontend.typeChecker);
Luau::freeze(frontend.typeChecker.globalTypes);
#ifdef CALLGRIND
CALLGRIND_ZERO_STATS;
#endif
std::vector<std::string> files = getSourceFiles(argc, argv);
int failed = 0;