Compare commits

..

No commits in common. "3158abe329924cd17e8036102665378814e39b43" and "fd8b415ab327c798c2d04599d06806ab0e2fef4a" have entirely different histories.

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.utility import pdebug, warning, pmessage
from regina.utility.globals import user_agent_platforms, user_agent_browsers, settings from regina.utility.globals import user_agent_platforms, user_agent_browsers, settings
months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aut", "Sep", "Oct", "Nov", "Dec"]
class Request: class Request:
def __init__(self, ip_address="", time_local="", request_type="", request_route="", request_protocol="", status="", bytes_sent="", referer="", user_agent=""): def __init__(self, ip_address="", time_local="", request_type="", request_route="", request_protocol="", status="", bytes_sent="", referer="", user_agent=""):

View File

@ -324,7 +324,6 @@ def visualize(db: Database):
pdebug(f"visualize: total={total}, last_x_days={last_x_days}", lvl=3) 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: 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)) assert(len(single_date_names) == len(single_date_constraints))
pdebug(f"visualize: {suffix} getting request and visitor history", lvl=2)
pprogress("Getting statistics") pprogress("Getting statistics")
@ -425,6 +424,7 @@ def visualize(db: Database):
pprogress("Generating platform ranking") pprogress("Generating platform ranking")
platform_ranking = get_platform_ranking(db, whole_timespan_timestamps, only_human=False) platform_ranking = get_platform_ranking(db, whole_timespan_timestamps, only_human=False)
platform_ranking = make_ranking_relative(platform_ranking) platform_ranking = make_ranking_relative(platform_ranking)
pdebug("visualize: platform ranking:", platform_ranking, lvl=3)
if img_out_dir: 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"]) 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) savefig(f"ranking_platform_{suffix}", fig_os_rating)