KCML_PerfMetric_OpenFile

Purpose

Opens a file to receive performance metrics

Definition

DEFSUB 'KCML_PerfMetric_OpenFile(filename$, eMode) AS Bool

Parameters

filenameName of the file
eModeOpen mode.

Return

Returns TRUE if /etc/kcml/msgq.conf has the suppressverify flag and the file was successfully opened.

Description

Opens a file and associates it with the performance metric message queue. As this function is intended for use on internal systems, ie to measure performance while running tests, it only has an effect when /etc/kcml/msgq.conf has either the suppressverify or perfopenfile flags set to 1. The latter perfopenfile key allows the use of this function on internal systems that have security enabled for KCML_PerfMetric_Set & KCML_PerfMetric_Clear. The exact behaviour is determined by the eMode parameter. Performance metrics will continue to be sent to the RabbitMQ server if the _KCML_MQF_QUEUE flag is set. They will not be sent to the RabbitMQ server if the file was openeded and _KCML_MQF_QUEUE was not set. The _KCML_MQF_LOCK flag is intended to be used if multiple processes need to send metrics to the same file; the file will be temporarily locked while performance metrics are written to it. The _KCML_MQF_APPEND flag will cause performance metrics to be written to the end of an existing file. If a file is already open, then it is closed before the new file is opened. The file should be closed with KCML_PerfMetric_CloseFile, after which performance metrics will be sent to the RabbitMQ server if that was disabled by not using the _KCML_MQF_QUEUE flag.

See also

Internal KCML Functions, Internally defined structures and Internally defined enumerations and constants.