Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trackrdrd
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
trackrdrd
Commits
91b391b6
Commit
91b391b6
authored
Apr 30, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configure the idle.pause
parent
70e47621
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
config.c
src/config.c
+14
-0
regress.sh
src/test/regress.sh
+1
-1
trackrdrd.h
src/trackrdrd.h
+2
-0
No files found.
src/config.c
View file @
91b391b6
...
...
@@ -179,6 +179,18 @@ CONF_Add(const char *lval, const char *rval)
return
(
EINVAL
);
}
if
(
strcmp
(
lval
,
"idle.pause"
)
==
0
)
{
char
*
p
;
errno
=
0
;
double
d
=
strtod
(
rval
,
&
p
);
if
(
errno
==
ERANGE
)
return
errno
;
if
(
p
[
0
]
!=
'\0'
||
d
<
0
||
isnan
(
d
)
||
!
finite
(
d
))
return
EINVAL
;
config
.
idle_pause
=
d
;
return
0
;
}
return
EINVAL
;
}
...
...
@@ -198,6 +210,7 @@ CONF_Init(void)
config
.
maxdata
=
DEF_MAXDATA
;
config
.
maxkeylen
=
DEF_MAXKEYLEN
;
config
.
qlen_goal
=
DEF_QLEN_GOAL
;
config
.
idle_pause
=
DEF_IDLE_PAUSE
;
config
.
mq_module
[
0
]
=
'\0'
;
config
.
mq_config_file
[
0
]
=
'\0'
;
...
...
@@ -253,6 +266,7 @@ CONF_Dump(void)
confdump
(
"nworkers = %u"
,
config
.
nworkers
);
confdump
(
"restarts = %u"
,
config
.
restarts
);
confdump
(
"restart.pause = %u"
,
config
.
restart_pause
);
confdump
(
"idle.pause = %f"
,
config
.
idle_pause
);
confdump
(
"thread.restarts = %u"
,
config
.
thread_restarts
);
confdump
(
"user = %s"
,
config
.
user_name
);
}
src/test/regress.sh
View file @
91b391b6
...
...
@@ -21,7 +21,7 @@ CMD="../trackrdrd -D -f varnish.binlog -l - -d -c test.conf"
# the user running it
CKSUM
=
$(
$CMD
|
sed
-e
's/\(initializing\) \(.*\)/\1/'
|
sed
-e
's/\(Running as\) \([a-zA-Z0-9]*\)$/\1/'
|
grep
-v
'Not running as root'
|
cksum
)
if
[
"
$CKSUM
"
!=
'
3547423616 248886
'
]
;
then
if
[
"
$CKSUM
"
!=
'
2726228080 249605
'
]
;
then
echo
"ERROR: Regression test incorrect log cksum:
$CKSUM
"
exit
1
fi
...
...
src/trackrdrd.h
View file @
91b391b6
...
...
@@ -260,6 +260,8 @@ struct config {
char
user_name
[
BUFSIZ
];
uid_t
uid
;
gid_t
gid
;
#define DEF_IDLE_PAUSE 0.01
double
idle_pause
;
}
config
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment