Navigation
API > API/Runtime > API/Runtime/Analytics
Implements a fast key/value database to store the metrics gathered to create the session summary event. The store is buffered in memory until it is flushed to disk by calling Flush(). It is not designed to handle millions of key/value pairs, but rather a small subset that fits in memory. The implementation reserve disk space ahead of time and can usually perform in-place update. Setting or getting intrinsic types (int32, uint32, int64, uint64, float, double, bool as well as FDateTime) doesn't allocate memory. The string time is often updated in place if enough capacity was reserved. All store operations are thread safe and atomic from the caller perspective.
| Name | FAnalyticsPropertyStore |
| Type | class |
| Header File | /Engine/Source/Runtime/Analytics/Analytics/Public/AnalyticsPropertyStore.h |
| Include Path | #include "AnalyticsPropertyStore.h" |
Syntax
class FAnalyticsPropertyStore : public IAnalyticsPropertyStore
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| AnalyticsPropertyStore.h | |||
FAnalyticsPropertyStore
(
const FAnalyticsPropertyStore& |
AnalyticsPropertyStore.h | ||
| Create an empty store. | AnalyticsPropertyStore.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FAnalyticsPropertyStore() |
AnalyticsPropertyStore.h |
Classes
| Name | Remarks |
|---|---|
| FFlushWorker | Helper task to persist the properties to disk in the background. |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AsyncFlushDataCopy | TArray< uint8 > | AnalyticsPropertyStore.h | ||
| bFragmented | bool | AnalyticsPropertyStore.h | ||
| FileHandle | TUniquePtr< IFileHandle > | AnalyticsPropertyStore.h | ||
| FlushTask | TUniquePtr< FAsyncTask< FFlushWorker > > | AnalyticsPropertyStore.h | ||
| NameOffsetMap | TMap< FString, uint32 > | AnalyticsPropertyStore.h | ||
| StorageBuf | TArray< uint8 > | AnalyticsPropertyStore.h | ||
| StorageReader | FMemoryReader | AnalyticsPropertyStore.h | ||
| StorageWriter | FMemoryWriter | AnalyticsPropertyStore.h | ||
| StoreLock | FTransactionallySafeCriticalSection | AnalyticsPropertyStore.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool Create
(
const FString& Pathname, |
Create a new store, creating the file of the specified capacity and resetting the current state. | AnalyticsPropertyStore.h | |
bool IsValid() |
Returns true is the store was successfully created or loaded. | AnalyticsPropertyStore.h | |
bool Load
(
const FString& Pathname |
Load the specified file in memory, resetting the current state. | AnalyticsPropertyStore.h |
Overridden from IAnalyticsPropertyStore
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool Contains
(
const FString& Key |
Returns true if the store contains the specified key. | AnalyticsPropertyStore.h | |
| Flushes cached values to disk. | AnalyticsPropertyStore.h | ||
virtual EStatusCode Get
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Get
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Get
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Get
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Get
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Get
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Get
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Get
(
const FString& Key, |
Reads the specified key value from the store. | AnalyticsPropertyStore.h | |
virtual EStatusCode Get
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual uint32 Num() |
Returns the number of elements in the store. | AnalyticsPropertyStore.h | |
virtual bool Remove
(
const FString& Key |
Removes the specified key from the store. | AnalyticsPropertyStore.h | |
virtual void RemoveAll() |
Removes all existing keys from the store. | AnalyticsPropertyStore.h | |
virtual EStatusCode Set
(
const FString& Key, |
Conditionnnaly adds or updates the specified key/value pair. | AnalyticsPropertyStore.h | |
virtual EStatusCode Set
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Set
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Set
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Set
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Set
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Set
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Set
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Set
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Set
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Set
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Set
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Set
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Set
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Set
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
| AnalyticsPropertyStore.h | |||
virtual EStatusCode Set
(
const FString& Key, |
Adds or updates the specified key/value pair. | AnalyticsPropertyStore.h | |
| AnalyticsPropertyStore.h | |||
virtual EStatusCode Update
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Update
(
const FString& Key, |
Updates an exiting value. | AnalyticsPropertyStore.h | |
virtual EStatusCode Update
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Update
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Update
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Update
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Update
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Update
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual EStatusCode Update
(
const FString& Key, |
AnalyticsPropertyStore.h | ||
virtual void VisitAll
(
const TFunction< void(FAnalyticsEventAttribute&&)>& VisitFn |
Iterates the keys currently stored and invokes the visitor function for each key, converting the value to its string representation. | AnalyticsPropertyStore.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAnalyticsPropertyStore & operator=
(
const FAnalyticsPropertyStore& |
AnalyticsPropertyStore.h | ||
| AnalyticsPropertyStore.h |