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 
00145   int cperfdmf_initialize(char *configFile);
00146   
00151   void cperfdmf_finalize();
00152   
00153   
00154   
00155   
00160 
00171   int cperfdmf_connectDB(char *password);
00172 
00173 
00186   int cperfdmf_getApplications(cperfdmf_application_t** applications, int* numApplications);
00187 
00188 
00203   int cperfdmf_getExperiments(cperfdmf_experiment_t** experiments, int* numExperiments, int applicationId);
00204 
00205 
00220   int cperfdmf_getTrials(cperfdmf_trial_t** trials, int *numTrials, int experimentId);
00221 
00222 
00233   int cperfdmf_loadTrial(int trialId);
00234 
00235 
00248   int cperfdmf_saveApplication(cperfdmf_application_t* application);
00249 
00250 
00251 
00264   int cperfdmf_saveExperiment(cperfdmf_experiment_t* experiment);
00265 
00266 
00267 
00278   int cperfdmf_saveTrial(cperfdmf_trial_t* trial);
00279 
00280 
00294   int cperfdmf_uploadTauOutput(int* trialId, char* path, int experimentId);
00295 
00296   
00307   int cperfdmf_deleteApplication(int applicationId);
00308 
00319   int cperfdmf_deleteExperiment(int experimentId);
00320 
00331   int cperfdmf_deleteTrial(int trialId);
00332 
00333 
00342   void cperfdmf_freeApplicationList(cperfdmf_application_t* applications, int numApplications); 
00343 
00344 
00353   void cperfdmf_freeExperimentList(cperfdmf_experiment_t* experiments, int numExperiments); 
00354 
00355 
00364   void cperfdmf_freeTrialList(cperfdmf_trial_t* trials, int numTrials); 
00365   // end of DB (doxygen) group
00367 
00368 
00379   int cperfdmf_loadTauOutput(char *path);
00380 
00381 
00395   int cperfdmf_getMetrics(char*** metrics, int* numMetrics);
00396 
00397 
00411   int cperfdmf_getFunctions(char*** functions, int* numFunctions);
00412 
00413 
00425   int cperfdmf_getNumNodes(int* numNodes);
00426 
00427 
00440   int cperfdmf_getNumContexts(int* numContexts, int node);
00441 
00442 
00456   int cperfdmf_getNumThreads(int* numThreads, int node, int context);
00457 
00458 
00472   int cperfdmf_getMeanValues(cperfdmf_profile_t *prof, int functionId, int metric);
00473 
00487   int cperfdmf_getTotalValues(cperfdmf_profile_t* prof, int functionId, int metric);
00488 
00505   int cperfdmf_getValues(cperfdmf_profile_t* prof, int functionId, int metric, int node, int context, int thread);
00506 
00507 
00508 
00509 
00521   int cperfdmf_queryNodeExists(int* exists, int node);
00522 
00523 
00536   int cperfdmf_queryContextExists(int* exists, int node, int context);
00537 
00538 
00552   int cperfdmf_queryThreadExists(int* exists, int node, int context, int thread);
00553 
00554 
00568   int cperfdmf_getGroups(char*** groups, int* numGroups);
00569 
00570 
00586   int cperfdmf_getUserEvents(cperfdmf_userEvent_t **userEvents, int *numUserEvents, int node, int context, int thread);
00587 
00588 
00595   char *cperfdmf_getExtendedError(void);
00596 
00597 
00606   char *cperfdmf_errToString(int code);
00607 
00608 
00609 
00610 #ifdef __cplusplus
00611 }
00612 #endif /* __cplusplus */
00613 
00614 
00615 
00616 #endif /* __CPERFDMF_H__ */

Generated on Fri Sep 2 11:27:17 2005 for C API for PerfDMF by  doxygen 1.3.9.1