2020-01-25 11:05:38 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "cache.h"
|
2022-07-12 10:54:56 +00:00
|
|
|
#include "powertrail.h"
|
2020-01-25 11:05:38 +00:00
|
|
|
|
2021-04-20 20:41:20 +00:00
|
|
|
#include <functional>
|
|
|
|
|
2020-01-28 05:13:11 +00:00
|
|
|
void htmlencode(std::string& data);
|
|
|
|
|
2020-02-11 16:34:23 +00:00
|
|
|
void show_histogram(const Caches& cc, std::string Cache::*ptr, const std::string& caption, bool html = 0, bool sort_by_val = 1);
|
2020-07-17 17:57:46 +00:00
|
|
|
void show_histogram(const pCaches& cc, std::string Cache::*ptr, const std::string& caption, bool html = 0, bool sort_by_val = 1);
|
2020-06-02 22:26:45 +00:00
|
|
|
void show_histogram(const std::map<std::string, int>& data, const std::string& caption, bool html = 0, bool sort_by_val = 1);
|
2022-07-12 10:54:56 +00:00
|
|
|
void show_histogram(const pPowertrails& tt, const std::string& caption, bool html = 0, bool sort_by_val = 1);
|
2020-07-17 17:57:46 +00:00
|
|
|
void show_nested_histogram(const pCaches& fcc, std::string Cache::*ptr, std::string Cache::*ptr2, const std::string& caption, bool html = 0, bool sort_by_val = 1);
|
2020-01-25 11:05:38 +00:00
|
|
|
|
2021-04-20 20:44:03 +00:00
|
|
|
int find_streak(const Date_Caches& cc, std::time_t& start);
|
2020-02-23 00:41:15 +00:00
|
|
|
|
|
|
|
long int get_num(char c, char* opt);
|
2020-07-05 21:30:51 +00:00
|
|
|
|
|
|
|
void average_html(const Caches& cc, float Cache::*ptr, const std::string& caption);
|
|
|
|
void average_html(const Caches& cc, int Cache::*ptr, const std::string& caption);
|
|
|
|
float average(const Caches& cc, float Cache::*ptr);
|
|
|
|
float average(const Caches& cc, int Cache::*ptr);
|
2020-08-05 00:37:38 +00:00
|
|
|
|
|
|
|
void sum_html(const Caches& cc, float Cache::*ptr, const std::string& caption);
|
|
|
|
void sum_html(const Caches& cc, int Cache::*ptr, const std::string& caption);
|
|
|
|
float sum(const Caches& cc, float Cache::*ptr);
|
|
|
|
int sum(const Caches& cc, int Cache::*ptr);
|
2020-08-06 14:54:11 +00:00
|
|
|
|
2021-04-20 20:41:20 +00:00
|
|
|
int count_caches(const Caches& cc, std::string& codes, std::function<bool(const Cache& c)> test);
|
|
|
|
|
2020-08-06 19:13:40 +00:00
|
|
|
void header_html();
|
2020-08-06 14:54:11 +00:00
|
|
|
void footer_html();
|