| 
    HawkTracer
    0.10.0
    
   | 
 
Stores a map of strings and their hash values. More...
#include <hawktracer/timeline.h>Go to the source code of this file.
Functions | |
| HT_DECLS_BEGIN HT_API HT_ErrorCode | ht_feature_cached_string_enable (HT_Timeline *timeline, HT_Boolean thread_safe) | 
| Enables a feature for the timeline.  More... | |
| HT_API uintptr_t | ht_feature_cached_string_add_mapping (HT_Timeline *timeline, const char *label) | 
| Adds a mapping.  More... | |
| HT_API void | ht_feature_cached_string_push_map (HT_Timeline *timeline) | 
| Pushes mapping events of all the strings registered in the feature.  More... | |
| HT_API uintptr_t | ht_feature_cached_string_add_mapping_dynamic (HT_Timeline *timeline, const char *label) | 
Stores a map of strings and their hash values.
The feature allows to reduce a size of the payload being generated by HawkTracer by generating a special event (Mapping Event) that contains a mapping between string value and the number, so the user can use the hash value when sends the string.
| HT_API uintptr_t ht_feature_cached_string_add_mapping | ( | HT_Timeline * | timeline, | 
| const char * | label | ||
| ) | 
Adds a mapping.
The function also pushes a mapping event to the timeline.
| timeline | the timeline. | 
| label | a string to map. The string must be a static string (i.e. must be valid for the whole period of the program). For dynamic strings, use ht_feature_cached_string_add_mapping_dynamic() | 
| HT_API uintptr_t ht_feature_cached_string_add_mapping_dynamic | ( | HT_Timeline * | timeline, | 
| const char * | label | ||
| ) | 
| HT_DECLS_BEGIN HT_API HT_ErrorCode ht_feature_cached_string_enable | ( | HT_Timeline * | timeline, | 
| HT_Boolean | thread_safe | ||
| ) | 
Enables a feature for the timeline.
| timeline | the timeline. | 
| thread_safe | wether the feature should be thread-safe (i.e. will be used across different threads) or not. | 
| HT_API void ht_feature_cached_string_push_map | ( | HT_Timeline * | timeline | ) | 
Pushes mapping events of all the strings registered in the feature.
| timeline | the timeline. |