1 /* -*- c-file-style: "java"; indent-tabs-mode: nil; tab-width: 4; fill-column: 78 -*-
2  *
3  * distcc -- A simple distributed compiler system
4  *
5  * Copyright 2005 Google Inc.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
20  * USA.
21  *
22  * Author: Thomas Kho
23  */
24 
25 #ifndef _DISTCC_STATS_H
26 #define _DISTCC_STATS_H
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 enum stats_e { STATS_TCP_ACCEPT, STATS_REJ_BAD_REQ, STATS_REJ_OVERLOAD,
33                 STATS_COMPILE_OK, STATS_COMPILE_ERROR, STATS_COMPILE_TIMEOUT,
34                 STATS_CLI_DISCONN, STATS_OTHER, STATS_ENUM_MAX };
35 
36 extern const char *stats_text[20];
37 
38 int  dcc_stats_init(void);
39 void dcc_stats_init_kid(void);
40 int  dcc_stats_server(int listen_fd);
41 void dcc_stats_event(enum stats_e e);
42 void dcc_stats_compile_ok(char *compiler, char *filename, struct timeval start,
43      struct timeval stop, int time_usec);
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 #endif /* _DISTCC_STATS_H */
50