mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 05:41:26 +02:00
Add a fourth character to the second column of the "typed output format" to indicate whether the value results from a volatile or persistent metric ('V' or 'P' characters respectively). A persistent metric means the value could possibily be preserved across reloads by leveraging a shared memory between multiple co-processes. Such metrics are identified as "shared" in the code (since they are possibly shared between multiple co-processes) Some reg-tests were updated to take that change into account, also, some outputs in the configuration manual were updated to reflect current behavior.
45 lines
918 B
Plaintext
45 lines
918 B
Plaintext
varnishtest "Preload counters via stats-file"
|
|
|
|
feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(3.0-dev9)'"
|
|
feature ignore_unknown_macro
|
|
|
|
haproxy h1 -conf {
|
|
global
|
|
.if feature(THREAD)
|
|
thread-groups 1
|
|
.endif
|
|
|
|
stats-file ${testdir}/sample-stats-file
|
|
|
|
defaults
|
|
timeout client 30s
|
|
timeout server 30s
|
|
timeout connect 30s
|
|
|
|
frontend fe
|
|
guid guid-fe
|
|
bind "fd@${feS}" guid-prefix guid-feS
|
|
|
|
frontend fe2
|
|
guid guid-fe2
|
|
option socket-stats
|
|
bind "fd@${fe2S}" guid-prefix guid-fe2S
|
|
|
|
backend be
|
|
guid guid-be
|
|
server srv ${s1_addr}:${s1_port} guid guid-srv
|
|
} -start
|
|
|
|
haproxy h1 -cli {
|
|
send "show stat fe 15 -1 typed"
|
|
expect ~ "F.*.*.*.stot.1:MCP.*:u64:1024"
|
|
|
|
send "show stat fe2 15 -1 typed"
|
|
expect ~ "L.*.*.*.stot.1:MCP.*:u64:1024"
|
|
|
|
send "show stat be 15 -1 typed"
|
|
expect ~ "B.*.*.*.stot.1:MCP.*:u64:1024"
|
|
send "show stat be 15 -1 typed"
|
|
expect ~ "S.*.*.*.stot.1:MCP.*:u64:1024"
|
|
}
|