Main Page | Modules | Data Structures | File List | Data Fields | Globals

cperfdmf.h

Go to the documentation of this file.
00001 
00028 #ifndef __CPERFDMF_H__
00029 #define __CPERFDMF_H__
00030 
00031 
00032 
00036 typedef struct cperfdmf_trial_t {
00038   int appId;  
00040   int expId;
00042   int trialId;
00043   char *name;
00044 
00045   char **fieldNames;
00046   char **fields;
00047   int numFields;
00048 } cperfdmf_trial_t;
00049 
00050 
00054 typedef struct cperfdmf_experiment_t {
00055   int appId;
00056   int expId;
00057   char *name;
00058 
00059   char **fieldNames;
00060   char **fields;
00061   int numFields;
00062 } cperfdmf_experiment_t;
00063 
00064 
00068 typedef struct cperfdmf_application_t {
00069   char *name;
00070   int appId;
00071 
00072   char **fieldNames;
00073   char **fields;
00074   int numFields;
00075 } cperfdmf_application_t;
00076 
00077 
00081 typedef struct cperfdmf_profile_t {
00082   double exclusive;
00083   double exclusivePercent;
00084   double inclusive;
00085   double inclusivePerCall;
00086   double inclusivePercent;
00087   int numCalls;
00088   int numSubroutines;
00089   int *groups;
00090   int numGroups;
00091   /*
00092     int context;
00093     int node;
00094     int numCalls;
00095     int numSubroutines;
00096     int thread;
00097   */
00098 } cperfdmf_profile_t;
00099 
00100 
00104 typedef struct cperfdmf_userEvent_t {
00105   char* name;
00106   int numSamples;
00107   double maxValue;
00108   double minValue;
00109   double meanValue;
00110   double sumSquared;
00111 } cperfdmf_userEvent_t;
00112 
00113 
00120 typedef enum {
00121   CPERFDMF_OK           =  0,
00122   CPERFDMF_ERR          = -1,
00123   CPERFDMF_NON_EXISTENT = -2,
00124   CPERFDMF_ERR_NO_PROFILES  = -3,
00125   CPERFDMF_ERR_INTERNAL_ERROR = -6,
00126   CPERFDMF_ERR_DB_NOT_INITIALIZED = -7,
00127   CPERFDMF_ERR_SESSION_NOT_INITIALIZED = -8,
00128   CPERFDMF_ERR_JAVA_EXCEPTION = -9
00129 } cperfdmf_error_t;
00130 
00131 
00132 #ifdef __cplusplus
00133 extern "C" {
00134 #endif /* __cplusplus */
00135 
00143   int cperfdmf_initialize();
00144   
00149   void cperfdmf_finalize();
00150   
00151   
00152   
00153   
00158 
00170   int cperfdmf_connectDB(char *configFile, char *password);
00171 
00172 
00185   int cperfdmf_getApplications(cperfdmf_application_t** applications, int* numApplications);
00186 
00187 
00202   int cperfdmf_getExperiments(cperfdmf_experiment_t** experiments, int* numExperiments, int applicationId);
00203 
00204 
00219   int cperfdmf_getTrials(cperfdmf_trial_t** trials, int *numTrials, int experimentId);
00220 
00221 
00232   int cperfdmf_loadTrial(int trialId);
00233 
00234 
00247   int cperfdmf_saveApplication(cperfdmf_application_t* application);
00248 
00249 
00250 
00263   int cperfdmf_saveExperiment(cperfdmf_experiment_t* experiment);
00264 
00265 
00266 
00277   int cperfdmf_saveTrial(cperfdmf_trial_t* trial);
00278 
00279 
00293   int cperfdmf_uploadTauOutput(int* trialId, char* path, int experimentId);
00294 
00295   
00306   int cperfdmf_deleteApplication(int applicationId);
00307 
00318   int cperfdmf_deleteExperiment(int experimentId);
00319 
00330   int cperfdmf_deleteTrial(int trialId);
00331 
00332 
00341   void cperfdmf_freeApplicationList(cperfdmf_application_t* applications, int numApplications); 
00342 
00343 
00352   void cperfdmf_freeExperimentList(cperfdmf_experiment_t* experiments, int numExperiments); 
00353 
00354 
00363   void cperfdmf_freeTrialList(cperfdmf_trial_t* trials, int numTrials); 
00364   // end of DB (doxygen) group
00366 
00367 
00378   int cperfdmf_loadTauOutput(char *path);
00379 
00380 
00394   int cperfdmf_getMetrics(char*** metrics, int* numMetrics);
00395 
00396 
00410   int cperfdmf_getFunctions(char*** functions, int* numFunctions);
00411 
00412 
00424   int cperfdmf_getNumNodes(int* numNodes);
00425 
00426 
00439   int cperfdmf_getNumContexts(int* numContexts, int node);
00440 
00441 
00455   int cperfdmf_getNumThreads(int* numThreads, int node, int context);
00456 
00457 
00471   int cperfdmf_getMeanValues(cperfdmf_profile_t *prof, int functionId, int metric);
00472 
00486   int cperfdmf_getTotalValues(cperfdmf_profile_t* prof, int functionId, int metric);
00487 
00504   int cperfdmf_getValues(cperfdmf_profile_t* prof, int functionId, int metric, int node, int context, int thread);
00505 
00506 
00507 
00508 
00520   int cperfdmf_queryNodeExists(int* exists, int node);
00521 
00522 
00535   int cperfdmf_queryContextExists(int* exists, int node, int context);
00536 
00537 
00551   int cperfdmf_queryThreadExists(int* exists, int node, int context, int thread);
00552 
00553 
00567   int cperfdmf_getGroups(char*** groups, int* numGroups);
00568 
00569 
00585   int cperfdmf_getUserEvents(cperfdmf_userEvent_t **userEvents, int *numUserEvents, int node, int context, int thread);
00586 
00587 
00594   char *cperfdmf_getExtendedError(void);
00595 
00596 
00605   char *cperfdmf_errToString(int code);
00606 
00607 
00608 
00609 #ifdef __cplusplus
00610 }
00611 #endif /* __cplusplus */
00612 
00613 
00614 
00615 #endif /* __CPERFDMF_H__ */

Generated on Thu May 19 10:48:58 2005 for C API for PerfDMF by  doxygen 1.3.9.1