mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 08:05:45 +00:00
Measure how long reading the header file takes
This commit is contained in:
parent
b25d64e5e7
commit
cef9b08efb
@ -1,5 +1,7 @@
|
||||
#include "HeaderFileReader.h"
|
||||
|
||||
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
|
||||
#include "Impl/HeaderLexer.h"
|
||||
@ -62,5 +64,10 @@ bool HeaderFileReader::ReadHeaderFile(IDataRepository* repository)
|
||||
const auto lexer = std::make_unique<HeaderLexer>(m_stream);
|
||||
const auto parser = std::make_unique<HeaderParser>(lexer.get(), repository);
|
||||
|
||||
return parser->Parse();
|
||||
const auto start = std::chrono::steady_clock::now();
|
||||
const auto result = parser->Parse();
|
||||
const auto end = std::chrono::steady_clock::now();
|
||||
std::cout << "Processing header took " << std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count() << "ms" << std::endl;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user