Compare commits

...

2 Commits

Author SHA1 Message Date
matthias@arch
3158abe329 fixed august typo 2023-08-08 13:05:13 +02:00
matthias@arch
d539672d72 improved debug 2023-08-08 13:05:07 +02:00
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ from regina.utility.sql_util import sanitize, sql_select, sql_exists, sql_insert
from regina.utility.utility import pdebug, warning, pmessage
from regina.utility.globals import user_agent_platforms, user_agent_browsers, settings
months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aut", "Sep", "Oct", "Nov", "Dec"]
months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
class Request:
def __init__(self, ip_address="", time_local="", request_type="", request_route="", request_protocol="", status="", bytes_sent="", referer="", user_agent=""):

View File

@ -324,6 +324,7 @@ def visualize(db: Database):
pdebug(f"visualize: total={total}, last_x_days={last_x_days}", lvl=3)
for suffix, whole_timespan_timestamps, single_date_constraints, single_date_names, single_date_timestamps in todos:
assert(len(single_date_names) == len(single_date_constraints))
pdebug(f"visualize: {suffix} getting request and visitor history", lvl=2)
pprogress("Getting statistics")
@ -424,7 +425,6 @@ def visualize(db: Database):
pprogress("Generating platform ranking")
platform_ranking = get_platform_ranking(db, whole_timespan_timestamps, only_human=False)
platform_ranking = make_ranking_relative(platform_ranking)
pdebug("visualize: platform ranking:", platform_ranking, lvl=3)
if img_out_dir:
fig_os_rating = plot_ranking(platform_ranking, xlabel="Platform", ylabel="Share [%]", color_settings=color_settings_platforms, figsize=settings["plot-generation"]["size_narrow"])
savefig(f"ranking_platform_{suffix}", fig_os_rating)