profiling: honor limit in json rule output

pull/2559/head
Victor Julien 9 years ago
parent a9a228a289
commit 7d8a5a75ef

@ -307,7 +307,7 @@ static void DumpJson(FILE *fp, SCProfileSummary *summary, uint32_t count, uint64
CreateIsoTimeString(&tval, timebuf, sizeof(timebuf)); CreateIsoTimeString(&tval, timebuf, sizeof(timebuf));
json_object_set_new(js, "timestamp", json_string(timebuf)); json_object_set_new(js, "timestamp", json_string(timebuf));
for (i = 0; i < count; i++) { for (i = 0; i < MIN(count, profiling_rules_limit); i++) {
/* Stop dumping when we hit our first rule with 0 checks. Due /* Stop dumping when we hit our first rule with 0 checks. Due
* to sorting this will be the beginning of all the rules with * to sorting this will be the beginning of all the rules with
* 0 checks. */ * 0 checks. */

@ -1416,7 +1416,7 @@ profiling:
# Sort options: ticks, avgticks, checks, matches, maxticks # Sort options: ticks, avgticks, checks, matches, maxticks
sort: avgticks sort: avgticks
# Limit the number of items printed at exit (ignored for json). # Limit the number of sids for which stats are shown at exit.
limit: 100 limit: 100
# output to json # output to json

Loading…
Cancel
Save