MCPcopy Create free account
hub / github.com/apache/trafficserver / GeneratorInitialize

Function GeneratorInitialize

plugins/generator/generator.cc:796–810  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

794}
795
796static void
797GeneratorInitialize()
798{
799 TxnHook = TSContCreate(GeneratorTxnHook, nullptr);
800 memset(GeneratorData, 'x', sizeof(GeneratorData));
801
802 if (TSStatFindName("generator.response_bytes", &StatCountBytes) == TS_ERROR) {
803 StatCountBytes = TSStatCreate("generator.response_bytes", TS_RECORDDATATYPE_COUNTER, TS_STAT_NON_PERSISTENT, TS_STAT_SYNC_SUM);
804 }
805
806 if (TSStatFindName("generator.response_count", &StatCountResponses) == TS_ERROR) {
807 StatCountResponses =
808 TSStatCreate("generator.response_count", TS_RECORDDATATYPE_COUNTER, TS_STAT_NON_PERSISTENT, TS_STAT_SYNC_COUNT);
809 }
810}
811
812void
813TSPluginInit(int /* argc */, const char * /* argv */[])

Callers 2

TSPluginInitFunction · 0.85
TSRemapInitFunction · 0.85

Calls 4

TSContCreateFunction · 0.85
memsetFunction · 0.85
TSStatFindNameFunction · 0.85
TSStatCreateFunction · 0.85

Tested by

no test coverage detected