From 49703eee7b1a2a806d59ba445745ad8e2713d78c Mon Sep 17 00:00:00 2001 From: Robert Schmidt <robert.schmidt@openairinterface.org> Date: Sat, 17 Jun 2023 09:19:41 +0200 Subject: [PATCH] Rename threadPoolMeasurements to OAI_THREADPOOLMEASUREMENTS - make it clear that it belongs to OAI - follow convention of uppercase name --- common/utils/threadPool/thread-pool.c | 2 +- common/utils/threadPool/thread-pool.md | 4 ++-- doc/environment-variables.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/utils/threadPool/thread-pool.c b/common/utils/threadPool/thread-pool.c index 5531a3aed34..1a2fafdbf8e 100644 --- a/common/utils/threadPool/thread-pool.c +++ b/common/utils/threadPool/thread-pool.c @@ -106,7 +106,7 @@ void *one_thread(void *arg) { void initNamedTpool(char *params,tpool_t *pool, bool performanceMeas, char *name) { memset(pool,0,sizeof(*pool)); - char *measr=getenv("threadPoolMeasurements"); + char *measr=getenv("OAI_THREADPOOLMEASUREMENTS"); pool->measurePerf=performanceMeas; // force measurement if the output is defined pool->measurePerf |= measr!=NULL; diff --git a/common/utils/threadPool/thread-pool.md b/common/utils/threadPool/thread-pool.md index 311857ff3e9..02dd9e03873 100644 --- a/common/utils/threadPool/thread-pool.md +++ b/common/utils/threadPool/thread-pool.md @@ -182,7 +182,7 @@ Returns the total number of jobs that were aborted, i.e., waiting for execution ## Performance measurements -A performance measurement is integrated: the pool will automacillay fill timestamps if you set the environement variable `threadPoolMeasurements` to a valid file name. The following measurements will be written to Linux pipe on a per-job basis: +A performance measurement is integrated: the pool will automacillay fill timestamps if you set the environement variable `OAI_THREADPOOLMEASUREMENTS` to a valid file name. The following measurements will be written to Linux pipe on a per-job basis: * `creationTime`: time the request is push to the pool; * `startProcessingTime`: time a worker start to run on the job @@ -193,6 +193,6 @@ The `measurement_display` tool to read the Linux pipe and display it in ASCII is In the cmake build directory, type `make/ninja measurement_display`. Use as follows: ``` -sudo threadPoolMeasurements=tpool.meas ./nr-softmodem ... +sudo OAI_THREADPOOLMEASUREMENTS=tpool.meas ./nr-softmodem ... ./measurement_display tpool.meas ``` diff --git a/doc/environment-variables.md b/doc/environment-variables.md index 9137533e8ad..9439ebd64c1 100644 --- a/doc/environment-variables.md +++ b/doc/environment-variables.md @@ -8,10 +8,10 @@ OAI uses/supports a number of environment variables, documented in the following - `NVRAM_DIR`: directory to read/write NVRAM data in (5G) `nvram` tool; if not defined, will use `PWD` (working directory) - `OAI_CONFIGMODULE`: can be used to pass the configuration file instead of `-O` - `OAI_GDBSTACKS`: if defined when hitting an assertion (`DevAssert()`, `AssertFatal()`, ...), OAI will load `gdb` and provide a backtrace for every thread +- `OAI_THREADPOOLMEASUREMENTS`: path to a file to store thread pool debugging information, see the [thread pool documentation](..common/utils/threadPool/thread-pool.md) - `OPENAIR_DIR`: should point to the root directory of OpenAirInterface; some code relies on this to get a filename, e.g., BLER curves for L2sim channel emulation - `RFSIMULATOR`: the RFsimulator's work mode, can be either `server` (for server mode) or a valid IP address (for client mode) - `USIM_DIR`: directory to read/write USIM data in (4G) `usim` tool; if not defined, will use `PWD` (working directory) -- `threadPoolMeasurements`: path to a file to store thread pool debugging information, see the [thread pool documentation](..common/utils/threadPool/thread-pool.md) Furthermore, these variables appear in code that is not maintained and maybe not even compiled anywhere: - `HOST`: alternative host to connect to, for CLI, if neither `REMADDR` nor `SSH_CLIENT` are defined -- GitLab