#ifdef _MSC_VER
start = clock();
ngx_http_dummy_data_parse(ctx, r);
cf->request_processed++;
end = clock();
#else
if ((start = times(&tmsstart)) == (clock_t)-1)
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"XX-dummy : Failed to get time");
ngx_http_dummy_data_parse(ctx, r);
cf->request_processed++;
if ((end = times(&tmsend)) == (clock_t)-1)
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"XX-dummy : Failed to get time");
#endif
if (end - start > 10) // report if it took more than 1/10MS to perform all the checks
|
#ifdef _MSC_VER
start = GetProcessTimes(GetCurrentProcess(), &createTime, &exitTime, &sysTime, &cpuTime);
ngx_http_dummy_data_parse(ctx, r);
cf->request_processed++;
end = GetProcessTimes(GetCurrentProcess(), &createTime2, &exitTime2, &sysTime2, &cpuTime2);
#else
if ((start = times(&tmsstart)) == (clock_t)-1)
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"XX-dummy : Failed to get time");
ngx_http_dummy_data_parse(ctx, r);
cf->request_processed++;
if ((end = times(&tmsend)) == (clock_t)-1)
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"XX-dummy : Failed to get time");
#endif
if (end - start > 10)
|
if (end - start > 10) // report if it took more than 1/10MS to perform all the checks |