state->last_check.result = result;
- if ( result != DETECTION_OPTION_NO_MATCH )
- NODE_PERF_PROFILE_STOP_MATCH(node_stats);
+ NODE_PERF_PROFILE_STOP(node_stats, result != DETECTION_OPTION_NO_MATCH);
return result;
}
{
if ((compression == CMP_GZIP) || (compression == CMP_DEFLATE))
{
- compress_stream->next_in = (z_const Bytef*)data;
+ compress_stream->next_in = (Bytef*)data;
compress_stream->avail_in = length;
compress_stream->next_out = buffer + body_offset;
compress_stream->avail_out = MAX_OCTETS - body_offset;
#define NODE_PERF_PROFILE_BLOCK(stats) \
if ( NODE_PERF_PROFILE(stats) )
+#define NODE_PERF_PROFILE_STOP(stats, match) \
+ PERF_PROFILER_NAME(stats) .stop(match)
+
#define NODE_PERF_PROFILE_STOP_MATCH(stats) \
- PERF_PROFILER_NAME(stats) .stop(true)
+ NODE_PERF_PROFILE_STOP(stats, true)
#define NODE_PERF_PROFILE_STOP_NO_MATCH(stats) \
- PERF_PROFILER_NAME(stats) .stop(false)
+ NODE_PERF_PROFILE_STOP(stats, false)
#define PERF_PAUSE_BLOCK(stats) \
if ( ProfilerPause<decltype(PERF_PROFILER_NAME(stats))> \
#define PERF_PROFILE_THREAD_LOCAL_BLOCK(stats, idx)
#define NODE_PERF_PROFILE(stats)
#define NODE_PERF_PROFILE_BLOCK(stats)
+#define NODE_PERF_PROFILE_STOP(stats, match)
#define NODE_PERF_PROFILE_STOP_MATCH(stats)
#define NODE_PERF_PROFILE_STOP_NO_MATCH(stats)
#define PERF_PAUSE_BLOCK(stats)