Files
externals/linux/include/celoxica/latmemseq_timing.h
T
2017-10-04 14:16:02 -04:00

33 lines
1.2 KiB
C

#ifndef __LMSEQ_TIMING_MOD_H__
#define __LMSEQ_TIMING_MOD_H__
#include <inttypes.h>
#include "latmemseq_timing_private.h"
/** Define your structure here. */
typedef struct
{
uint64_t Start;
uint64_t BeforePluginCall;
uint64_t AfterPluginCall;
uint64_t End;
} LMSeq_Record;
/** Should be modified to print your structure properly. */
void static inline LMSTimingRecordToFile(FILE* OutputFile, void* Record)
{
LMSeq_Record* CR = (LMSeq_Record*)Record;
uint64_t RunTime = LMSTimingTimestampDiffToNS(CR->Start, CR->End);
fprintf(OutputFile, "Total RunTime = %" PRIu64 "\n", RunTime);
fprintf(OutputFile, "Start of Order Place%" PRIu64 "\n", LMSTimingTimestampToNS(CR->Start));
fprintf(OutputFile, "Before plugin call %" PRIu64 "\n", LMSTimingTimestampToNS(CR->BeforePluginCall));
fprintf(OutputFile, "After plugin call %" PRIu64 "\n", LMSTimingTimestampToNS(CR->AfterPluginCall));
fprintf(OutputFile, "After Order Management %" PRIu64 "\n", LMSTimingTimestampToNS(CR->End));
fprintf(OutputFile, "=============================\n");
}
extern LMSTimingRecords *TR_In; // Pointer to all records
extern LMSeq_Record* CurrentRecord;// The current Record (For Get/Close)
#endif //__LATMEMSEQ_TIMING_MOD_H__