From 58e1b61f5b397c873ddadbe932c9c6045b73ab03 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Tue, 10 May 2022 11:48:01 -0400 Subject: [PATCH] [core] feature-flag server.metrics-high-precision server.feature-flags += ("server.metrics-high-precision" => "enable") (default: "disable") enables high-resolution timestamps, currently used for request start time This is automatically enabled if mod_accesslog log record format uses high-resolution format specifiers in the template, but this feature needs to be enabled if that is not the case and a high-resolution request start time is desired for use in lua scripts run by mod_magnet, e.g. to measure time-to-first-byte https://wiki.lighttpd.net/AbsoLUAtion#Time-to-First-Byte --- src/configfile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/configfile.c b/src/configfile.c index 30ab6e5f..23cb8d06 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -1196,7 +1196,9 @@ int config_finalize(server *srv, const buffer *default_server_tag) { /* settings might be enabled during plugins_call_set_defaults() */ p->defaults.high_precision_timestamps = - srv->srvconf.high_precision_timestamps; + srv->srvconf.high_precision_timestamps = + config_feature_bool(srv, "server.metrics-high-precision", + srv->srvconf.high_precision_timestamps); /* configure default server_tag if not set * (if configured to blank, unset server_tag)*/