Skip to content

Commit d789c7a

Browse files
committed
HAVE_FPM_LQ is always defined
1 parent c865350 commit d789c7a

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

sapi/fpm/fpm/fpm_scoreboard.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void fpm_scoreboard_update(int idle, int active, int lq, int lq_len, int request
101101
if (lq_len >= 0) {
102102
scoreboard->lq_len = lq_len;
103103
}
104-
#ifdef HAVE_FPM_LQ /* prevent unnecessary test */
104+
#if HAVE_FPM_LQ /* prevent unnecessary test */
105105
if (scoreboard->lq > scoreboard->lq_max) {
106106
scoreboard->lq_max = scoreboard->lq;
107107
}

sapi/fpm/fpm/fpm_status.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ int fpm_status_export_to_zval(zval *status)
8585
add_assoc_long(status, "start-time", scoreboard.start_epoch);
8686
add_assoc_long(status, "start-since", now_epoch - scoreboard.start_epoch);
8787
add_assoc_long(status, "accepted-conn", scoreboard.requests);
88-
#ifdef HAVE_FPM_LQ
88+
#if HAVE_FPM_LQ
8989
add_assoc_long(status, "listen-queue", scoreboard.lq);
9090
add_assoc_long(status, "max-listen-queue", scoreboard.lq_max);
9191
add_assoc_long(status, "listen-queue-len", scoreboard.lq_len);
@@ -103,7 +103,7 @@ int fpm_status_export_to_zval(zval *status)
103103
continue;
104104
}
105105
proc_p = &procs[i];
106-
#ifdef HAVE_FPM_LQ
106+
#if HAVE_FPM_LQ
107107
/* prevent NaN */
108108
if (procs[i].cpu_duration.tv_sec == 0 && procs[i].cpu_duration.tv_usec == 0) {
109109
cpu = 0.;
@@ -130,7 +130,7 @@ int fpm_status_export_to_zval(zval *status)
130130
add_assoc_long(&fpm_proc_stat, "request-length", procs[i].content_length);
131131
add_assoc_string(&fpm_proc_stat, "user", procs[i].auth_user[0] != '\0' ? procs[i].auth_user : "-");
132132
add_assoc_string(&fpm_proc_stat, "script", procs[i].script_filename[0] != '\0' ? procs[i].script_filename : "-");
133-
#ifdef HAVE_FPM_LQ
133+
#if HAVE_FPM_LQ
134134
add_assoc_double(&fpm_proc_stat, "last-request-cpu", procs[i].request_stage == FPM_REQUEST_ACCEPTING ? cpu : 0.);
135135
#endif
136136
add_assoc_long(&fpm_proc_stat, "last-request-memory", procs[i].request_stage == FPM_REQUEST_ACCEPTING ? procs[i].memory : 0);
@@ -245,7 +245,7 @@ int fpm_status_handle_request(void) /* {{{ */
245245
"<tr><th>start time</th><td>%s</td></tr>\n"
246246
"<tr><th>start since</th><td>%lu</td></tr>\n"
247247
"<tr><th>accepted conn</th><td>%lu</td></tr>\n"
248-
#ifdef HAVE_FPM_LQ
248+
#if HAVE_FPM_LQ
249249
"<tr><th>listen queue</th><td>%d</td></tr>\n"
250250
"<tr><th>max listen queue</th><td>%d</td></tr>\n"
251251
"<tr><th>listen queue len</th><td>%u</td></tr>\n"
@@ -275,7 +275,7 @@ int fpm_status_handle_request(void) /* {{{ */
275275
"<th>content length</th>"
276276
"<th>user</th>"
277277
"<th>script</th>"
278-
#ifdef HAVE_FPM_LQ
278+
#if HAVE_FPM_LQ
279279
"<th>last request cpu</th>"
280280
#endif
281281
"<th>last request memory</th>"
@@ -294,7 +294,7 @@ int fpm_status_handle_request(void) /* {{{ */
294294
"<td>%zu</td>"
295295
"<td>%s</td>"
296296
"<td>%s</td>"
297-
#ifdef HAVE_FPM_LQ
297+
#if HAVE_FPM_LQ
298298
"<td>%.2f</td>"
299299
#endif
300300
"<td>%zu</td>"
@@ -317,7 +317,7 @@ int fpm_status_handle_request(void) /* {{{ */
317317
"<start-time>%s</start-time>\n"
318318
"<start-since>%lu</start-since>\n"
319319
"<accepted-conn>%lu</accepted-conn>\n"
320-
#ifdef HAVE_FPM_LQ
320+
#if HAVE_FPM_LQ
321321
"<listen-queue>%d</listen-queue>\n"
322322
"<max-listen-queue>%d</max-listen-queue>\n"
323323
"<listen-queue-len>%u</listen-queue-len>\n"
@@ -346,7 +346,7 @@ int fpm_status_handle_request(void) /* {{{ */
346346
"<content-length>%zu</content-length>"
347347
"<user>%s</user>"
348348
"<script>%s</script>"
349-
#ifdef HAVE_FPM_LQ
349+
#if HAVE_FPM_LQ
350350
"<last-request-cpu>%.2f</last-request-cpu>"
351351
#endif
352352
"<last-request-memory>%zu</last-request-memory>"
@@ -367,7 +367,7 @@ int fpm_status_handle_request(void) /* {{{ */
367367
"\"start time\":%s,"
368368
"\"start since\":%lu,"
369369
"\"accepted conn\":%lu,"
370-
#ifdef HAVE_FPM_LQ
370+
#if HAVE_FPM_LQ
371371
"\"listen queue\":%d,"
372372
"\"max listen queue\":%d,"
373373
"\"listen queue len\":%u,"
@@ -397,7 +397,7 @@ int fpm_status_handle_request(void) /* {{{ */
397397
"\"content length\":%zu,"
398398
"\"user\":\"%s\","
399399
"\"script\":\"%s\","
400-
#ifdef HAVE_FPM_LQ
400+
#if HAVE_FPM_LQ
401401
"\"last request cpu\":%.2f,"
402402
#endif
403403
"\"last request memory\":%zu"
@@ -417,7 +417,7 @@ int fpm_status_handle_request(void) /* {{{ */
417417
"start time: %s\n"
418418
"start since: %lu\n"
419419
"accepted conn: %lu\n"
420-
#ifdef HAVE_FPM_LQ
420+
#if HAVE_FPM_LQ
421421
"listen queue: %d\n"
422422
"max listen queue: %d\n"
423423
"listen queue len: %u\n"
@@ -444,7 +444,7 @@ int fpm_status_handle_request(void) /* {{{ */
444444
"content length: %zu\n"
445445
"user: %s\n"
446446
"script: %s\n"
447-
#ifdef HAVE_FPM_LQ
447+
#if HAVE_FPM_LQ
448448
"last request cpu: %.2f\n"
449449
#endif
450450
"last request memory: %zu\n";
@@ -459,7 +459,7 @@ int fpm_status_handle_request(void) /* {{{ */
459459
time_buffer,
460460
(unsigned long) (now_epoch - scoreboard.start_epoch),
461461
scoreboard.requests,
462-
#ifdef HAVE_FPM_LQ
462+
#if HAVE_FPM_LQ
463463
scoreboard.lq,
464464
scoreboard.lq_max,
465465
scoreboard.lq_len,
@@ -486,7 +486,7 @@ int fpm_status_handle_request(void) /* {{{ */
486486
zend_string *tmp_query_string;
487487
char *query_string;
488488
struct timeval duration, now;
489-
#ifdef HAVE_FPM_LQ
489+
#if HAVE_FPM_LQ
490490
float cpu;
491491
#endif
492492

@@ -522,7 +522,7 @@ int fpm_status_handle_request(void) /* {{{ */
522522
}
523523
}
524524

525-
#ifdef HAVE_FPM_LQ
525+
#if HAVE_FPM_LQ
526526
/* prevent NaN */
527527
if (proc.cpu_duration.tv_sec == 0 && proc.cpu_duration.tv_usec == 0) {
528528
cpu = 0.;
@@ -551,7 +551,7 @@ int fpm_status_handle_request(void) /* {{{ */
551551
proc.content_length,
552552
proc.auth_user[0] != '\0' ? proc.auth_user : "-",
553553
proc.script_filename[0] != '\0' ? proc.script_filename : "-",
554-
#ifdef HAVE_FPM_LQ
554+
#if HAVE_FPM_LQ
555555
proc.request_stage == FPM_REQUEST_ACCEPTING ? cpu : 0.,
556556
#endif
557557
proc.request_stage == FPM_REQUEST_ACCEPTING ? proc.memory : 0);

0 commit comments

Comments
 (0)