summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-09-16 11:56:07 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-09-16 11:56:07 +0200
commit760e5f0d3986aa93a07e207dde3206741ec3ad74 (patch)
tree81ccd4767e616810b19d946280cdf2fb6d841b89 /plugins
parent1e819a8afe9494cc760196ac91f3b617bc073de9 (diff)
downloadrsyslog-760e5f0d3986aa93a07e207dde3206741ec3ad74.tar.gz
rsyslog-760e5f0d3986aa93a07e207dde3206741ec3ad74.tar.xz
rsyslog-760e5f0d3986aa93a07e207dde3206741ec3ad74.zip
performance optimization: unnecessary time() calls during message parsing removed
thanks to David Lang for his excellent performance analysis
Diffstat (limited to 'plugins')
-rw-r--r--plugins/immark/immark.c2
-rw-r--r--plugins/imuxsock/imuxsock.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/immark/immark.c b/plugins/immark/immark.c
index bdca4d58..323da3fe 100644
--- a/plugins/immark/immark.c
+++ b/plugins/immark/immark.c
@@ -76,7 +76,7 @@ CODESTARTrunInput
* rgerhards, 2007-12-17
*/
CHKiRet(thrdSleep(pThrd, iMarkMessagePeriod, 0)); /* seconds, micro seconds */
- logmsgInternal(NO_ERRCODE, LOG_INFO, (uchar*)"-- MARK --", ADDDATE|MARK);
+ logmsgInternal(NO_ERRCODE, LOG_INFO, (uchar*)"-- MARK --", MARK);
}
finalize_it:
return iRet;
diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c
index d94ee34c..55b8b2df 100644
--- a/plugins/imuxsock/imuxsock.c
+++ b/plugins/imuxsock/imuxsock.c
@@ -71,7 +71,7 @@ static int startIndexUxLocalSockets; /* process funix from that index on (used t
* read-only after startup
*/
static int funixParseHost[MAXFUNIX] = { 0, }; /* should parser parse host name? read-only after startup */
-static int funixFlags[MAXFUNIX] = { ADDDATE, }; /* should parser parse host name? read-only after startup */
+static int funixFlags[MAXFUNIX] = { IGNDATE, }; /* should parser parse host name? read-only after startup */
static uchar *funixn[MAXFUNIX] = { (uchar*) _PATH_LOG }; /* read-only after startup */
static uchar *funixHName[MAXFUNIX] = { NULL, }; /* host-name override - if set, use this instead of actual name */
static int funixFlowCtl[MAXFUNIX] = { eFLOWCTL_NO_DELAY, }; /* flow control settings for this socket */
@@ -93,7 +93,7 @@ static int bIgnoreTimestamp = 1; /* ignore timestamps present in the incoming me
static rsRetVal setSystemLogTimestampIgnore(void __attribute__((unused)) *pVal, int iNewVal)
{
DEFiRet;
- funixFlags[0] = iNewVal ? ADDDATE : NOFLAG;
+ funixFlags[0] = iNewVal ? IGNDATE : NOFLAG;
RETiRet;
}
@@ -126,7 +126,7 @@ static rsRetVal addLstnSocketName(void __attribute__((unused)) *pVal, uchar *pNe
funixHName[nfunix] = pLogHostName;
pLogHostName = NULL; /* re-init for next, not freed because funixHName[] now owns it */
funixFlowCtl[nfunix] = bUseFlowCtl ? eFLOWCTL_LIGHT_DELAY : eFLOWCTL_NO_DELAY;
- funixFlags[nfunix] = bIgnoreTimestamp ? ADDDATE : NOFLAG;
+ funixFlags[nfunix] = bIgnoreTimestamp ? IGNDATE : NOFLAG;
funixn[nfunix++] = pNewVal;
}
else {