Some tweaks for stats and top-clients #124
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By submitting this pull request, I confirm the following (please check boxes, eg [X]) Failure to fill the template will close your PR:
Please submit all pull requests against the
development
branch. Failure to do so will delay or deny your requestHow familiar are you with the codebase?:
10
Currently,
unique_clients
(in the output of>stats
) returns the number of clients thatFTL
has ever seen in its runtime. However, this is inconsistent with the data returned by>top-clients
which only contains clients that are active, i.e. have made at least one query in the most recent 24 hours.This PR makes the behavior more consistent:
>stats
will returnunique_clients
that is consistent with the>top-lists
output (count only active clients). We add a new propertyclients_ever_seen
to preserve the information of how many unique clients FTL has seen in its runtime (whether or not they have been active recently) to not loose the availability of this data.We add
withzero
as an option to>top-clients
(e.g.>top-clients withzero (15)
). With this flag enabled, the top clients result will contain all clients that are know toFTL
, i.e. also those which haven't been active recently.Update
README.md
This template was created based on the work of
udemy-dl
.