Add some support for CPU profiling

This commit is contained in:
2021-12-17 16:21:56 -05:00
parent cfa6c28d34
commit 227a754b21
4 changed files with 33 additions and 1 deletions

View File

@@ -37,6 +37,9 @@ using LuaSourcePtr = std::unique_ptr<LuaSourceVec>;
using HashValue = std::pair<uint64_t, uint64_t>;
using IdVector = std::vector<int64_t>;
// Return nanoseconds elapsed, for profiling purposes.
int64_t profiling_clock();
// Return true if the string is a valid lua identifier.
bool is_identifier(const std::string &str);