Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: bootstat.h

Issue 3129002: Create a bootstat library for external C and C++ programs (Closed) Base URL: ssh://gitrw.chromium.org/bootstat.git
Patch Set: Fix whitespace issue found by presubmit check Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « README ('k') | bootstat.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Public API for the C and C++ bindings to the Chromium OS
6 // 'bootstat' facility. The facility is a simple timestamp
7 // mechanism to associate a named event with the time that it
8 // occurred and with other relevant statistics.
9
5 #ifndef BOOTSTAT_H_ 10 #ifndef BOOTSTAT_H_
6 #define BOOTSTAT_H_ 11 #define BOOTSTAT_H_
7 12
8 #if defined(__cplusplus) 13 #if defined(__cplusplus)
9 extern "C" { 14 extern "C" {
10 #endif 15 #endif
11 16
12 extern void bootstat_log(const char *); 17 //
18 // Length of the longest valid string naming an event, including the
19 // terminating NUL character. Clients of bootstat_log() can use
20 // this value for the size of buffers to hold event names; names
21 // that exceed this buffer size will be truncated.
22 //
23 // This value is arbitrarily chosen, but see comments in
24 // bootstat_log.c regarding implementation assumptions for this
25 // value.
26 //
27 #define BOOTSTAT_MAX_EVENT_LEN 64
28
29 // Log an event. Event names should be composed of characters drawn
30 // from this subset of 7-bit ASCII: Letters (upper- or lower-case),
31 // digits, dot ('.'), dash ('-'), and underscore ('_'). Case is
32 // significant. Behavior in the presence of other characters is
33 // unspecified - Caveat Emptor!
34 //
35 // Applications are responsible for establishing higher-level naming
36 // conventions to prevent name collisions.
37 extern void bootstat_log(const char* event_name);
13 38
14 #if defined(__cplusplus) 39 #if defined(__cplusplus)
15 } 40 }
16 #endif 41 #endif
17 #endif // BOOTSTAT_H_ 42 #endif // BOOTSTAT_H_
OLDNEW
« no previous file with comments | « README ('k') | bootstat.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698