PageRenderTime 31ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/llfasttimerview.h

https://bitbucket.org/lindenlab/viewer-beta/
C Header | 97 lines | 59 code | 13 blank | 25 comment | 0 complexity | 0cfade31ad01679c3ced6837635ca21a MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llfasttimerview.h
  3. * @brief LLFastTimerView class definition
  4. *
  5. * $LicenseInfo:firstyear=2004&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LL_LLFASTTIMERVIEW_H
  27. #define LL_LLFASTTIMERVIEW_H
  28. #include "llfloater.h"
  29. #include "llfasttimer.h"
  30. class LLFastTimerView : public LLFloater
  31. {
  32. public:
  33. LLFastTimerView(const LLSD&);
  34. BOOL postBuild();
  35. static BOOL sAnalyzePerformance;
  36. static void outputAllMetrics();
  37. static void doAnalysis(std::string baseline, std::string target, std::string output);
  38. private:
  39. static void doAnalysisDefault(std::string baseline, std::string target, std::string output) ;
  40. static LLSD analyzePerformanceLogDefault(std::istream& is) ;
  41. static void exportCharts(const std::string& base, const std::string& target);
  42. void onPause();
  43. public:
  44. virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
  45. virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
  46. virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
  47. virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
  48. virtual BOOL handleHover(S32 x, S32 y, MASK mask);
  49. virtual BOOL handleToolTip(S32 x, S32 y, MASK mask);
  50. virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
  51. virtual void draw();
  52. LLFastTimer::NamedTimer* getLegendID(S32 y);
  53. F64 getTime(const std::string& name);
  54. protected:
  55. virtual void onClickCloseBtn();
  56. private:
  57. typedef std::vector<std::vector<S32> > bar_positions_t;
  58. bar_positions_t mBarStart;
  59. bar_positions_t mBarEnd;
  60. S32 mDisplayMode;
  61. typedef enum child_alignment
  62. {
  63. ALIGN_LEFT,
  64. ALIGN_CENTER,
  65. ALIGN_RIGHT,
  66. ALIGN_COUNT
  67. } ChildAlignment;
  68. ChildAlignment mDisplayCenter;
  69. S32 mDisplayCalls;
  70. S32 mDisplayHz;
  71. U64 mAvgCountTotal;
  72. U64 mMaxCountTotal;
  73. LLRect mBarRect;
  74. S32 mScrollIndex;
  75. LLFastTimer::NamedTimer* mHoverID;
  76. LLFastTimer::NamedTimer* mHoverTimer;
  77. LLRect mToolTipRect;
  78. S32 mHoverBarIndex;
  79. LLFrameTimer mHighlightTimer;
  80. S32 mPrintStats;
  81. S32 mAverageCyclesPerTimer;
  82. LLRect mGraphRect;
  83. };
  84. #endif