PageRenderTime 52ms CodeModel.GetById 47ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llcommon/llmetrics.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 60 lines | 19 code | 11 blank | 30 comment | 0 complexity | ee898326b4ffbf350f4768f8e5219f48 MD5 | raw file
 1/**
 2 * @file llmetrics.h
 3 * @author Kelly
 4 * @date 2007-05-25
 5 * @brief Declaration of metrics accumulation and associated functions
 6 *
 7 * $LicenseInfo:firstyear=2007&license=viewerlgpl$
 8 * Second Life Viewer Source Code
 9 * Copyright (C) 2010, Linden Research, Inc.
10 * 
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation;
14 * version 2.1 of the License only.
15 * 
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19 * Lesser General Public License for more details.
20 * 
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
24 * 
25 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
26 * $/LicenseInfo$
27 */
28
29#ifndef LL_LLMETRICS_H
30#define LL_LLMETRICS_H
31
32class LLMetricsImpl;
33class LLSD;
34
35class LL_COMMON_API LLMetrics
36{
37public:
38	LLMetrics();
39	virtual ~LLMetrics();
40
41	// Adds this event to aggregate totals and records details to syslog (llinfos)
42	virtual void recordEventDetails(const std::string& location, 
43						const std::string& mesg, 
44						bool success, 
45						LLSD stats);
46
47	// Adds this event to aggregate totals
48	virtual void recordEvent(const std::string& location, const std::string& mesg, bool success);
49
50	// Prints aggregate totals and resets the counts.
51	virtual void printTotals(LLSD meta);
52
53
54private:
55	
56	LLMetricsImpl* mImpl;
57};
58
59#endif
60