NUGU SDK Linux  1.7.6
nugu_prof.h File Reference
#include <nugu.h>
#include <base/nugu_uuid.h>
#include <glib.h>
+ Include dependency graph for nugu_prof.h:

Go to the source code of this file.

Classes

struct  nugu_prof_data
 Profiling raw data. More...
 

Typedefs

typedef void(* NuguProfCallback) (enum nugu_prof_type type, const struct nugu_prof_data *data, void *userdata)
 Callback prototype for receiving an attachment. More...
 

Enumerations

enum  nugu_prof_type {
  NUGU_PROF_TYPE_SDK_CREATED , NUGU_PROF_TYPE_SDK_PLUGIN_INIT_START , NUGU_PROF_TYPE_SDK_PLUGIN_INIT_DONE , NUGU_PROF_TYPE_SDK_INIT_DONE ,
  NUGU_PROF_TYPE_NETWORK_CONNECT_REQUEST , NUGU_PROF_TYPE_NETWORK_REGISTRY_REQUEST , NUGU_PROF_TYPE_NETWORK_REGISTRY_RESPONSE , NUGU_PROF_TYPE_NETWORK_REGISTRY_FAILED ,
  NUGU_PROF_TYPE_NETWORK_SERVER_ESTABLISH_REQUEST , NUGU_PROF_TYPE_NETWORK_SERVER_ESTABLISH_RESPONSE , NUGU_PROF_TYPE_NETWORK_SERVER_ESTABLISH_FAILED , NUGU_PROF_TYPE_NETWORK_CONNECTED ,
  NUGU_PROF_TYPE_NETWORK_DIRECTIVES_CLOSED , NUGU_PROF_TYPE_NETWORK_DNS_FAILED , NUGU_PROF_TYPE_NETWORK_SSL_FAILED , NUGU_PROF_TYPE_NETWORK_TIMEOUT ,
  NUGU_PROF_TYPE_NETWORK_INTERNAL_ERROR , NUGU_PROF_TYPE_NETWORK_INVALID_TOKEN , NUGU_PROF_TYPE_NETWORK_PING_REQUEST , NUGU_PROF_TYPE_NETWORK_PING_RESPONSE ,
  NUGU_PROF_TYPE_NETWORK_PING_FAILED , NUGU_PROF_TYPE_NETWORK_EVENT_REQUEST , NUGU_PROF_TYPE_NETWORK_EVENT_RESPONSE , NUGU_PROF_TYPE_NETWORK_EVENT_FAILED ,
  NUGU_PROF_TYPE_NETWORK_EVENT_ATTACHMENT_REQUEST , NUGU_PROF_TYPE_NETWORK_EVENT_DIRECTIVE_RESPONSE , NUGU_PROF_TYPE_NETWORK_EVENT_DIRECTIVE_TIMEOUT , NUGU_PROF_TYPE_LAST_SERVER_INITIATIVE_DATA ,
  NUGU_PROF_TYPE_WAKEUP_KEYWORD_DETECTED , NUGU_PROF_TYPE_ASR_LISTENING_STARTED , NUGU_PROF_TYPE_ASR_RECOGNIZE , NUGU_PROF_TYPE_ASR_RECOGNIZING_STARTED ,
  NUGU_PROF_TYPE_ASR_END_POINT_DETECTED , NUGU_PROF_TYPE_ASR_TIMEOUT , NUGU_PROF_TYPE_ASR_FIRST_ATTACHMENT , NUGU_PROF_TYPE_ASR_LAST_ATTACHMENT ,
  NUGU_PROF_TYPE_ASR_RESULT , NUGU_PROF_TYPE_TTS_SPEAK_DIRECTIVE , NUGU_PROF_TYPE_TTS_FAILED , NUGU_PROF_TYPE_TTS_STARTED ,
  NUGU_PROF_TYPE_TTS_NET_FIRST_ATTACHMENT , NUGU_PROF_TYPE_TTS_FIRST_ATTACHMENT , NUGU_PROF_TYPE_TTS_FIRST_DECODING , NUGU_PROF_TYPE_TTS_FIRST_PCM_WRITE ,
  NUGU_PROF_TYPE_TTS_LAST_ATTACHMENT , NUGU_PROF_TYPE_TTS_STOPPED , NUGU_PROF_TYPE_TTS_FINISHED , NUGU_PROF_TYPE_AUDIO_STARTED ,
  NUGU_PROF_TYPE_AUDIO_FINISHED , NUGU_PROF_TYPE_MAX
}
 Profiling type list. More...
 

Functions

NUGU_API void nugu_prof_clear (void)
 clear all cached profiling data
 
NUGU_API void nugu_prof_disable_tracelog (void)
 turn off the profiling trace log message
 
NUGU_API void nugu_prof_dump (enum nugu_prof_type from, enum nugu_prof_type to)
 Dump the profiling data between 'from' type to 'to' type. More...
 
NUGU_API void nugu_prof_enable_tracelog (void)
 turn on the profiling trace log message
 
NUGU_API int nugu_prof_get_diff_msec (const struct nugu_prof_data *prof1, const struct nugu_prof_data *prof2)
 Get the time difference(prof2 - prof1) value in milliseconds. More...
 
NUGU_API int nugu_prof_get_diff_msec_timespec (const struct timespec *ts1, const struct timespec *ts2)
 Get the time difference(ts2 - ts1) value in milliseconds. More...
 
NUGU_API int nugu_prof_get_diff_msec_type (enum nugu_prof_type type1, enum nugu_prof_type type2)
 Get the time difference(ts2 - ts1) value in milliseconds. More...
 
NUGU_API struct nugu_prof_datanugu_prof_get_last_data (enum nugu_prof_type type)
 Get last cached data by profiling type. More...
 
NUGU_API const char * nugu_prof_get_type_name (enum nugu_prof_type type)
 Get string type name for profiling type. More...
 
NUGU_API int nugu_prof_mark (enum nugu_prof_type type)
 Marking to profiling data and emit the callback. More...
 
NUGU_API int nugu_prof_mark_data (enum nugu_prof_type type, const char *dialog_id, const char *msg_id, const char *contents)
 Marking to profiling data with additional id and emit the callback. More...
 
NUGU_API void nugu_prof_set_callback (NuguProfCallback callback, void *userdata)
 Set profiling callback. More...