Navigation
Unreal Engine C++ API Reference > Runtime > Core > ProfilingDebugging
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/ProfilingDebugging/Histogram.h |
Include | #include "ProfilingDebugging/Histogram.h" |
Syntax
struct FHistogram
Remarks
Fairly generic histogram for values that have natural lower bound and possibly no upper bound, e.g., frame time
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
TArray< FBin > | Bins | Bins themselves, should be continous in terms of [MinValue; UpperBound) and sorted ascending by MinValue. |
![]() |
int64 | CountOfAllMeasures | |
![]() |
friend | FHistogramBuilder | This is exposed as a clean way to build bins while enforcing the condition mentioned above |
![]() |
double | MaximalMeasurement | |
![]() |
double | MinimalMeasurement | |
![]() |
double | SumOfAllMeasures | Quick stats for all bins |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | AddMeasurement
(
double Value |
Adds an observed measurement. |
![]() |
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). |
![]() ![]() |
FString | DefaultConvertBinToLabel
(
double MinValue, |
Default stringifier for bins for use with DumpToJsonString. |
![]() ![]() |
FString | DumpToJsonString
(
TFunctionRef< FString(double, double)> ConvertBinToLabel |
Returns a string in a Json format: [{"Bin":"BinName","Count":Count,"Sum":Sum},...]. |
![]() ![]() |
FString | Same as DumpToJsonString but uses a DefaultConvertBinToLabel. | |
![]() ![]() |
FString | DumpToJsonString2
(
TFunctionRef< FString(double, double)> ConvertBinToLabel |
Returns a string in a Json format: [{"BinName":{"Count":Count,"Sum":Sum}},...]. |
![]() ![]() |
FString | Same as DumpToJsonString2 but uses a DefaultConvertBinToLabel. | |
![]() |
void | Prints histogram contents to the log. | |
![]() ![]() |
double | Returns the average of all measurements (essentially a shortcut for Sum/Count). | |
![]() ![]() |
double | GetBinLowerBound
(
int IdxBin |
Gets lower bound of the bin, i.e. minimum value that goes into it. |
![]() ![]() |
int32 | GetBinObservationsCount
(
int IdxBin |
Gets number of observations in the bin. |
![]() ![]() |
double | GetBinObservationsSum
(
int IdxBin |
Gets sum of observations in the bin. |
![]() ![]() |
double | GetBinUpperBound
(
int IdxBin |
Gets upper bound of the bin, i.e. first value that does not go into it. |
![]() ![]() |
double | Returns the maximum of all measurements. | |
![]() ![]() |
double | Returns the minimum of all measurements. | |
![]() ![]() |
int32 | GetNumBins () |
Gets number of bins. |
![]() ![]() |
int64 | Returns the sum of all counts (the number of recorded measurements) | |
![]() ![]() |
double | Returns the sum of all measurements | |
![]() |
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) |
![]() |
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) |
![]() |
void | Inits histogram to mimic our existing hitch buckets | |
![]() |
void | InitLinear
(
double MinTime, |
Inits histogram with linear, equally sized bins |
![]() |
void | Reset () |
Resets measurements, without resetting the configured bins. |
Operators
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
FHistogram | operator-
(
const FHistogram& Other |
|
![]() ![]() |
FHistogram | operator+
(
const FHistogram& Other |
|
![]() |
FHistogram & | operator+=
(
const FHistogram& Other |
Classes
Type | Name | Description | |
---|---|---|---|
![]() |
FBin | Bin |