Paweł Bylica
10 years ago
4 changed files with 120 additions and 3 deletions
@ -0,0 +1,22 @@ |
|||||
|
#include "ExecStats.h" |
||||
|
|
||||
|
namespace dev |
||||
|
{ |
||||
|
namespace eth |
||||
|
{ |
||||
|
namespace jit |
||||
|
{ |
||||
|
|
||||
|
void ExecStats::execStarted() |
||||
|
{ |
||||
|
m_tp = std::chrono::high_resolution_clock::now(); |
||||
|
} |
||||
|
|
||||
|
void ExecStats::execEnded() |
||||
|
{ |
||||
|
execTime = std::chrono::high_resolution_clock::now() - m_tp; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include <string> |
||||
|
#include <chrono> |
||||
|
|
||||
|
namespace dev |
||||
|
{ |
||||
|
namespace eth |
||||
|
{ |
||||
|
namespace jit |
||||
|
{ |
||||
|
|
||||
|
class ExecStats |
||||
|
{ |
||||
|
public: |
||||
|
std::string id; |
||||
|
std::chrono::high_resolution_clock::duration compileTime; |
||||
|
std::chrono::high_resolution_clock::duration codegenTime; |
||||
|
std::chrono::high_resolution_clock::duration cacheLoadTime; |
||||
|
std::chrono::high_resolution_clock::duration execTime; |
||||
|
|
||||
|
void execStarted(); |
||||
|
void execEnded(); |
||||
|
|
||||
|
private: |
||||
|
std::chrono::high_resolution_clock::time_point m_tp; |
||||
|
|
||||
|
}; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue