sw_perf/profiling.c

31 lines
861 B
C
Raw Permalink Normal View History

/*********************************************************************************************
Description: data for profiling
Copyright : All right reserved by NCIC.ICT
Author : Zhang Zhonghai
Date : 2024/04/08
***********************************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <assert.h>
#include <time.h>
#include <sys/time.h>
#include "profiling.h"
uint64_t gprof[LIM_TYPE] = {0};
uint64_t gdata[LIM_TYPE] = {0};
FILE *ins_f_arr[LIM_TYPE],
*del_f_arr[LIM_TYPE],
*score_f_arr[LIM_TYPE],
*retval_f_arr[LIM_TYPE];
/* for profiling time */
uint64_t get_msec()
{
// struct timeval tv;
// gettimeofday(&tv, NULL);
// return (uint64_t)1000 * (tv.tv_sec + ((1e-6) * tv.tv_usec));
return clock();
}