Grid Community Toolkit  6.2.1705709074 (tag: v6.2.20240202)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
globus_utp.h
1 /*
2  * Copyright 1999-2006 University of Chicago
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /**********************************************************************
18 globus_utp.h
19 
20 Public declarations for the Unnamed Timing Package (UTP).
21 **********************************************************************/
22 
23 #ifndef GLOBUS_UTP_INCLUDE
24 #define GLOBUS_UTP_INCLUDE
25 
26 #include "globus_common.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 /**********************************************************************
33 Publicly-accessible functions.
34 **********************************************************************/
35 
36 extern int
37 globus_utp_init(unsigned numTimers, int mode);
38 
39 extern void
40 globus_utp_write_file(const char *outFilename);
41 
42 extern void
43 globus_utp_set_attribute(const char *keyStr,
44  const char *keyArg,
45  const char *valueStr,
46  ...);
47 
48 extern void
49 globus_utp_start_timer(unsigned timerNumber);
50 
51 extern void
52 globus_utp_stop_timer(unsigned timerNumber);
53 
54 extern void
55 globus_utp_reset_timer(unsigned timerNumber);
56 
57 extern void
58 globus_utp_disable_timer(unsigned timerNumber);
59 
60 extern void
61 globus_utp_enable_timer(unsigned timerNumber);
62 
63 extern void
64 globus_utp_disable_all_timers(void);
65 
66 extern void
67 globus_utp_enable_all_timers(void);
68 
69 extern const char *
70 globus_utp_name_timer(unsigned timerNumber,
71  const char *nameStr,
72  ...);
73 
74 extern void
75 globus_utp_get_accum_time(unsigned timerNumber,
76  double *time,
77  int *precision);
78 
79 
80 /**********************************************************************
81 Publicly-accessible definitions.
82 **********************************************************************/
83 
84 /*
85  * Initialization modes.
86  */
87 #define GLOBUS_UTP_MODE_SHARED 0 /* Pick one of these. */
88 #define GLOBUS_UTP_MODE_PRIVATE 1
89 
90 /*
91  * Strings for timer names and attribute keys and
92  * values must be shorter than this.
93  */
94 #define GLOBUS_UTP_MAX_NAME_LENGTH 240
95 
96 #define GLOBUS_UTP_DEFAULT_TIMER_NAME ""
97 
98 /******************************************************************************
99  Module activation structure
100 ******************************************************************************/
101 extern globus_module_descriptor_t globus_i_utp_module;
102 
103 #define GLOBUS_UTP_MODULE (&globus_i_utp_module)
104 
105 
106 #ifdef __cplusplus
107 }
108 #endif
109 
110 #endif /* #ifndef GLOBUS_UTP_INCLUDE */
Headers common to all of Globus.
Module Descriptor.
Definition: globus_module.h:71