Navigation
API > API/Runtime > API/Runtime/Core
Fairly generic histogram for values that have natural lower bound and possibly no upper bound, e.g., frame time
| Name | FHistogram |
| Type | struct |
| Header File | /Engine/Source/Runtime/Core/Public/ProfilingDebugging/Histogram.h |
| Include Path | #include "ProfilingDebugging/Histogram.h" |
Syntax
struct FHistogram
Structs
| Name | Remarks |
|---|---|
| FBin | Bin |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddMeasurement
(
double Value |
Adds an observed measurement. | ProfilingDebugging/Histogram.h | |
void AddMeasurement
(
double ValueForBinning, |
Adds an observed measurement (with a different thresholding key than the measurement, e.g., when accumulating time spent in a chart keyed on framerate). | ProfilingDebugging/Histogram.h | |
FString DumpToJsonString
(
TFunctionRef< FString(double, double)> ConvertBinToLabel |
Returns a string in a Json format: [{"Bin":"BinName","Count":Count,"Sum":Sum},...]. | ProfilingDebugging/Histogram.h | |
| Same as DumpToJsonString but uses a DefaultConvertBinToLabel. | ProfilingDebugging/Histogram.h | ||
FString DumpToJsonString2
(
TFunctionRef< FString(double, double)> ConvertBinToLabel |
Returns a string in a Json format: [{"BinName":{"Count":Count,"Sum":Sum}},...]. | ProfilingDebugging/Histogram.h | |
| Same as DumpToJsonString2 but uses a DefaultConvertBinToLabel. | ProfilingDebugging/Histogram.h | ||
void DumpToLog
(
const FString& HistogramName |
Prints histogram contents to the log. | ProfilingDebugging/Histogram.h | |
double GetAverageOfAllMeasures() |
Returns the average of all measurements (essentially a shortcut for Sum/Count). | ProfilingDebugging/Histogram.h | |
double GetBinLowerBound
(
int IdxBin |
Gets lower bound of the bin, i.e. minimum value that goes into it. | ProfilingDebugging/Histogram.h | |
int32 GetBinObservationsCount
(
int IdxBin |
Gets number of observations in the bin. | ProfilingDebugging/Histogram.h | |
double GetBinObservationsSum
(
int IdxBin |
Gets sum of observations in the bin. | ProfilingDebugging/Histogram.h | |
double GetBinUpperBound
(
int IdxBin |
Gets upper bound of the bin, i.e. first value that does not go into it. | ProfilingDebugging/Histogram.h | |
double GetMaxOfAllMeasures() |
Returns the maximum of all measurements. | ProfilingDebugging/Histogram.h | |
double GetMinOfAllMeasures() |
Returns the minimum of all measurements. | ProfilingDebugging/Histogram.h | |
int32 GetNumBins() |
Gets number of bins. | ProfilingDebugging/Histogram.h | |
int64 GetNumMeasurements() |
Returns the sum of all counts (the number of recorded measurements) | ProfilingDebugging/Histogram.h | |
double GetSumOfAllMeasures() |
Returns the sum of all measurements | ProfilingDebugging/Histogram.h | |
void InitFromArray
(
std::initializer_list< double > Thresholds |
Inits histogram with the specified bin boundaries, with the final bucket extending to infinity (e.g., passing in 0,5 creates a [0..5) bucket and a [5..infinity) bucket) | ProfilingDebugging/Histogram.h | |
void InitFromArray
(
TArrayView< const double > Thresholds |
Inits histogram with the specified bin boundaries, with the final bucket extending to infinity (e.g., passing in 0,5 creates a [0..5) bucket and a [5..infinity) bucket) | ProfilingDebugging/Histogram.h | |
void InitHitchTracking() |
Inits histogram to mimic our existing hitch buckets | ProfilingDebugging/Histogram.h | |
void InitLinear
(
double MinTime, |
Inits histogram with linear, equally sized bins | ProfilingDebugging/Histogram.h | |
void Reset() |
Resets measurements, without resetting the configured bins. | ProfilingDebugging/Histogram.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FString DefaultConvertBinToLabel
(
double MinValue, |
Default stringifier for bins for use with DumpToJsonString. | ProfilingDebugging/Histogram.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FHistogram operator-
(
const FHistogram& Other |
ProfilingDebugging/Histogram.h | ||
FHistogram operator+
(
const FHistogram& Other |
ProfilingDebugging/Histogram.h | ||
FHistogram & operator+=
(
const FHistogram& Other |
ProfilingDebugging/Histogram.h |