test/globus_utp.h

00001 /*
00002  * Copyright 1999-2006 University of Chicago
00003  * 
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  * http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 /**********************************************************************
00018 globus_utp.h
00019 
00020 Public declarations for the Unnamed Timing Package (UTP).
00021 **********************************************************************/
00022 
00023 #ifndef GLOBUS_UTP_INCLUDE
00024 #define GLOBUS_UTP_INCLUDE
00025 
00026 #include "globus_common.h"
00027 
00028 #ifdef __cplusplus
00029 extern "C" {
00030 #endif
00031 
00032 /**********************************************************************
00033 Publicly-accessible functions.
00034 **********************************************************************/
00035 
00036 extern int
00037 globus_utp_init(unsigned numTimers, int mode);
00038 
00039 extern void
00040 globus_utp_write_file(const char *outFilename);
00041 
00042 extern void
00043 globus_utp_set_attribute(const char *keyStr,
00044                          const char *keyArg,
00045                          const char *valueStr,
00046                          ...);
00047 
00048 extern void
00049 globus_utp_start_timer(unsigned timerNumber);
00050 
00051 extern void
00052 globus_utp_stop_timer(unsigned timerNumber);
00053 
00054 extern void
00055 globus_utp_reset_timer(unsigned timerNumber);
00056 
00057 extern void
00058 globus_utp_disable_timer(unsigned timerNumber);
00059 
00060 extern void
00061 globus_utp_enable_timer(unsigned timerNumber);
00062 
00063 extern void
00064 globus_utp_disable_all_timers(void);
00065 
00066 extern void
00067 globus_utp_enable_all_timers(void);
00068 
00069 extern const char *
00070 globus_utp_name_timer(unsigned timerNumber,
00071                       const char *nameStr,
00072                       ...);
00073 
00074 extern void
00075 globus_utp_get_accum_time(unsigned timerNumber,
00076                           double *time,
00077                           int *precision);
00078 
00079 
00080 /**********************************************************************
00081 Publicly-accessible definitions.
00082 **********************************************************************/
00083 
00084 /*
00085  * Initialization modes.
00086  */
00087 #define GLOBUS_UTP_MODE_SHARED  0       /* Pick one of these. */
00088 #define GLOBUS_UTP_MODE_PRIVATE 1
00089 
00090 /*
00091  * Strings for timer names and attribute keys and
00092  * values must be shorter than this.
00093  */
00094 #define GLOBUS_UTP_MAX_NAME_LENGTH 240
00095 
00096 #define GLOBUS_UTP_DEFAULT_TIMER_NAME ""
00097 
00098 /******************************************************************************
00099                           Module activation structure
00100 ******************************************************************************/
00101 extern globus_module_descriptor_t       globus_i_utp_module;
00102 
00103 #define GLOBUS_UTP_MODULE (&globus_i_utp_module)
00104 
00105 
00106 #ifdef __cplusplus
00107 }
00108 #endif
00109 
00110 #endif /* #ifndef GLOBUS_UTP_INCLUDE */

Generated on 2 May 2016 for globus_xio by  doxygen 1.4.7