add profiler
This commit is contained in:
@@ -21,8 +21,13 @@
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <cstddef>
|
||||
|
||||
#define INFO_LOG(fmt, args...) fprintf(stdout, "[INFO] " fmt "\n", ##args)
|
||||
#define DEBUG_LOG(fmt, args...) fprintf(stdout, "[DEBUG] " fmt "\n", ##args)
|
||||
#define WARN_LOG(fmt, args...) fprintf(stdout, "[WARN] " fmt "\n", ##args)
|
||||
#define ERROR_LOG(fmt, args...) fprintf(stdout, "[ERROR] " fmt "\n", ##args)
|
||||
|
||||
@@ -72,6 +77,10 @@ public:
|
||||
static double InferenceTimeAverage(double *x, int len);
|
||||
|
||||
static double InferenceTimeAverageWithoutFirst(double *x, int len);
|
||||
|
||||
static void ProfilerJson(bool isprof, map<char,string>& params);
|
||||
|
||||
static void DumpJson(bool isdump, map<char,string>& params);
|
||||
};
|
||||
|
||||
#pragma once
|
||||
|
||||
Reference in New Issue
Block a user