int main (int argc, char **argv) { poti_init (); poti_header (); poti_DefineContainerType ("PROCESS", "0", "PROCESS"); poti_DefineEventType ("EV", "PROCESS", "EV"); poti_CreateContainer (0, "p1", "PROCESS", "0", "p1"); poti_NewEvent(2.43, "p1", "EV", "PrimeiroEvento"); poti_NewEvent(2.87, "p1", "EV", "SegundoEvento"); //change the timestamp of destroy to be larger than that of latest NewEvent poti_DestroyContainer (1.34, "PROCESS", "p1"); poti_close(); return 0; }
int main (int argc, char **argv) { poti_init (); poti_header (); poti_DefineContainerType ("PROCESS", "0", "PROCESS"); poti_DefineStateType ("VAR", "PROCESS", "VAR"); poti_CreateContainer (0, "p1", "PROCESS", "0", "p1"); poti_SetState (0, "p1", "VAR", "Inicio"); poti_PushState (0.32, "p1", "VAR", "Meio"); poti_PopState (0.53, "p1", "VAR"); poti_PushState (0.86, "p1", "VAR", "Fim"); poti_PopState (0.99, "p1", "VAR"); poti_DestroyContainer (1.34, "PROCESS", "p1"); poti_close (); return 0; }
void poti_header (int basic, int old_header) { if (getenv("POTI_DISABLE_COMMENTS")){ disable_comments = 1; } if (paje_file == 0) { paje_file=stdout; } poti_init (paje_file); if (!disable_comments){ fprintf(paje_file,"#POTI_GIT_VERSION %s\n", POTI_GITVERSION); fprintf(paje_file,"#POTI_GIT_DATE (date of the cmake configuration) %s\n", POTI_GITDATE); } poti_header_only (basic, old_header); poti_alias_initialized = 1; }