0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-21 12:20:38 +00:00
netdata_netdata/libnetdata/string
Costa Tsaousis 2175104d41
Faster parents ()
* cache ctx in collection handle

* cache rd together with rda

* do not repeatedy call rrdcontexts - cached collection status; optimize pluginsd_acquire_dimension()

* fix unit tests

* do the absolutely minimum while updating timestamps, ensure validity during reading them

* when the stream is INTERPOLATED, buffer outstanding data for up to 50ms if the buffer contains DATA only.

* remove the spinlock from mrg

* remove the metric flags that are not used any more

* mrg writers can be different threads

* update first time when latest clean is also updated

* cleanup

* set hot page with a simple atomic operation

* sender sets chart slot for every chart

* work on senders without SLOT

* enable SLOT capability

* send slot at BEGIN when SLOT is enabled

* fix slot generation and parsing

* send slot while re-streaming

* use the sender capabilities, not the receiver

* cleanup

* add slots support to all chart and dimension related plugin commands

* fix condition

* fix calculation

* check sender capabilties

* assign slots in constructors

* we need the dimension slot at the DIMENSION keyword

* more debug info in case of dimension mismatch

* ensure the RRDDIM EXPOSED flag is multi-threaded and set it after the sender buffer has been committed, so that replication will not send dimensions prematurely

* fix renumbering on child restart

* reset rda caching when receiving a chart definition

* optimize pluginsd_end_v2()

* do not do zero sized allocations

* trust the chart slot id of the child

* cleanup charts on pluginsd thread exit

* better cleanup

* find the chart and put it in the slot, if it not already there

* move slots array to host

* initialize pluginsd slots properly

* add slots to replay begin; do not cleanup slots that dont belong to a chart

* cleanup on obsolete

* cleanup slots on obsoletions

* cleanup and renames about obsoletion

* rewrite obsolation service code to remove race conditions

* better service obsoletion log

* added debugging

* more debug

* exposed flag now compares versions

* removed debugging messages

* respolve conflicts

* fix replication check for unsent dimensions
2023-10-27 22:42:29 +03:00
..
Makefile.am RRD structures managed by dictionaries () 2022-09-19 23:46:13 +03:00
README.md More learn reorg/reordering () 2023-02-10 11:21:10 -08:00
string.c Faster parents () 2023-10-27 22:42:29 +03:00
string.h Faster parents () 2023-10-27 22:42:29 +03:00
utf8.h /api/v2 part 4 () 2023-03-13 23:39:06 +02:00

STRING

STRING provides a way to allocate and free text strings, while de-duplicating them.

It can be used similarly to libc string functions:

  • strdup() and strdupz() become string_strdupz().
  • strlen() becomes string_strlen() (and it does not walkthrough the bytes of the string).
  • free() and freez() become string_freez().

There is also a special string_dup() function that increases the reference counter of a STRING, avoiding the index lookup to find it.

Once there is a STRING *, the actual const char * can be accessed with string2str().

All STRING should be constant. Changing the contents of a const char * that has been acquired by string2str() should never happen.