PageRenderTime 36ms CodeModel.GetById 12ms 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
Possible License(s): LGPL-2.1
  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. #ifndef LL_LLMETRICS_H
  29. #define LL_LLMETRICS_H
  30. class LLMetricsImpl;
  31. class LLSD;
  32. class LL_COMMON_API LLMetrics
  33. {
  34. public:
  35. LLMetrics();
  36. virtual ~LLMetrics();
  37. // Adds this event to aggregate totals and records details to syslog (llinfos)
  38. virtual void recordEventDetails(const std::string& location,
  39. const std::string& mesg,
  40. bool success,
  41. LLSD stats);
  42. // Adds this event to aggregate totals
  43. virtual void recordEvent(const std::string& location, const std::string& mesg, bool success);
  44. // Prints aggregate totals and resets the counts.
  45. virtual void printTotals(LLSD meta);
  46. private:
  47. LLMetricsImpl* mImpl;
  48. };
  49. #endif