News for hackers. Stuff that matters.
Re:Show HN: Logparser – Alternative to GoAccess Written in P... by css on Thursday September 23, 2021 @11:19AM (#28630438)
IMO this could benefit from using `collections.Counter` instead of `defaultdict(set)`.
Re:Show HN: Logparser – Alternative to GoAccess Written in P... by masklinn on Thursday September 23, 2021 @12:01PM (#28631058)
With a `Counter` you would be counting each access from a given IP as a hit against a category, rather than counting the IP itsef.

Currently if 4 clients hit one URL and 1 client hits 5 logparser will register 5 records in each category (unless they're classified as bots for browsers and systems). With a Counter, it'd be 9.

Both informations could be accessible using a `defaultdict(Counter)` but I don't know how useful that would be to the people actually using logparser.