Nebula
Loading...
Searching...
No Matches
debugpagehandler.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
15#include "timing/time.h"
16
17//------------------------------------------------------------------------------
18namespace Debug
19{
21{
23public:
27 virtual void HandleRequest(const Ptr<Http::HttpRequest>& request);
28
29protected:
31 void ComputeMinMaxAvgTimes(const Util::Array<Timing::Time>& times, Timing::Time& outMin, Timing::Time& outMax, Timing::Time& outAvg, Timing::Time& outCur) const;
33 void ComputeMinMaxAvgCounts(const Util::Array<int>& counterValues, int& outMin, int& outMax, int& outAvg, int& outCur) const;
34
35private:
37 void HandleTimerRequest(const Util::String& timerName, const Ptr<Http::HttpRequest>& request);
39 void HandleCounterRequest(const Util::String& counterName, const Ptr<Http::HttpRequest>& request);
41 void HandleTimerChartRequest(const Util::String& timerName, const Ptr<Http::HttpRequest>& request);
43 void HandleCounterChartRequest(const Util::String& counterName, const Ptr<Http::HttpRequest>& request);
45 void HandleTimerTableSortRequest(const Util::String& columnName, const Util::String& tableName, const Ptr<Http::HttpRequest>& request);
47 void HandleCounterTableSortRequest(const Util::String& columnName, const Util::String& tableName, const Ptr<Http::HttpRequest>& request);
48
51};
52
53} // namespace Debug
54//------------------------------------------------------------------------------
55
Http request handler for the Debug subsystem.
Definition debugpagehandler.h:21
void HandleTimerChartRequest(const Util::String &timerName, const Ptr< Http::HttpRequest > &request)
handle HTTP request to render a timer chart
Definition debugpagehandler.cc:445
Util::Dictionary< Util::String, Util::String > timerSortColumns
Definition debugpagehandler.h:49
void HandleCounterChartRequest(const Util::String &counterName, const Ptr< Http::HttpRequest > &request)
handle HTTP request to render a counter char
Definition debugpagehandler.cc:487
void ComputeMinMaxAvgTimes(const Util::Array< Timing::Time > &times, Timing::Time &outMin, Timing::Time &outMax, Timing::Time &outAvg, Timing::Time &outCur) const
compute the min, max and average time from an array of times
Definition debugpagehandler.cc:323
void HandleCounterTableSortRequest(const Util::String &columnName, const Util::String &tableName, const Ptr< Http::HttpRequest > &request)
handle HTTP request to sort table
Definition debugpagehandler.cc:547
void HandleTimerRequest(const Util::String &timerName, const Ptr< Http::HttpRequest > &request)
handle HTTP request for a debug timer
Definition debugpagehandler.cc:385
void HandleCounterRequest(const Util::String &counterName, const Ptr< Http::HttpRequest > &request)
handle HTTP request for a debug counter
Definition debugpagehandler.cc:415
void HandleTimerTableSortRequest(const Util::String &columnName, const Util::String &tableName, const Ptr< Http::HttpRequest > &request)
handle HTTP request to sort table
Definition debugpagehandler.cc:536
__DeclareClass(DebugPageHandler)
Util::Dictionary< Util::String, Util::String > counterSortColumns
Definition debugpagehandler.h:50
void ComputeMinMaxAvgCounts(const Util::Array< int > &counterValues, int &outMin, int &outMax, int &outAvg, int &outCur) const
compute min, max and average values from an array of counter samples
Definition debugpagehandler.cc:354
DebugPageHandler()
constructor
Definition debugpagehandler.cc:27
virtual void HandleRequest(const Ptr< Http::HttpRequest > &request)
handle a http request
Definition debugpagehandler.cc:38
HttpRequestHandlers are attached to the HttpServer and process incoming HTTP requests.
Definition httprequesthandler.h:31
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Nebula's dynamic array class.
Definition array.h:60
A collection of key/value pairs with quick value retrieval by key at roughly O(log n).
Definition dictionary.h:34
Definition corepagehandler.cc:13
double Time
the time datatype
Definition time.h:18
Nebula's universal string class.
Definition string.h:50
Typedefs for the Timing subsystem.