Add data throughput calculation
This commit is contained in:
@@ -6,13 +6,11 @@ enum profiler_ids {
|
||||
PROFILER_ID_JSON_PARSE,
|
||||
PROFILER_ID_READ_JSON_FILE,
|
||||
PROFILER_ID_PARSER_SETUP,
|
||||
PROFILER_ID_LEX_GET_TOKEN,
|
||||
PROFILER_ID_PARSE_TOKEN,
|
||||
PROFILER_ID_PARSER_PARSE_TOKENS,
|
||||
PROFILER_ID_PARSER_TEAR_DOWN,
|
||||
PROFILER_ID_LOAD_JSON_PAIRS,
|
||||
PROFILER_ID_READ_BINARY,
|
||||
PROFILER_ID_HAVERSINE_SUM,
|
||||
PROFILER_ID_HAVERSINE_DISTANCE,
|
||||
PROFILER_ID_HAVERSINE_AVG,
|
||||
PROFILER_ID_TEAR_DOWN,
|
||||
PROFILER_ID_FREE_JSON,
|
||||
|
||||
@@ -9,14 +9,15 @@
|
||||
|
||||
#ifdef FULL_PROFILING
|
||||
#define SAMPLE_START(ID, TITLE) sample_start(ID, TITLE)
|
||||
#define SAMPLE_END(ID) sample_end(ID)
|
||||
#define SAMPLE_END(ID, BYTES) sample_end(ID, BYTES)
|
||||
#define SAMPLE_END_DEFAULT(ID) sample_end(ID, 0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void sample_start(u64 id, const char *title);
|
||||
void sample_end(u64 id);
|
||||
void sample_end(u64 id, u64 byte_count);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
@@ -24,7 +25,8 @@ void sample_end(u64 id);
|
||||
|
||||
#else
|
||||
#define SAMPLE_START(ID, TITLE)
|
||||
#define SAMPLE_END(ID)
|
||||
#define SAMPLE_END(ID, BYTES)
|
||||
#define SAMPLE_END_DEFAULT(ID)
|
||||
#endif // FULL_PROFILING
|
||||
|
||||
#if defined(BASIC_PROFILING) || defined(FULL_PROFILING)
|
||||
@@ -44,6 +46,7 @@ struct sample {
|
||||
u64 exclusive_time;
|
||||
u64 children_time;
|
||||
u64 hit_count;
|
||||
u64 byte_count;
|
||||
profiler_sample_t *parent;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user