10#include "vector_dist_performance_util.hpp"
11#include "Plot/GoogleChart.hpp"
12#include <boost/property_tree/xml_parser.hpp>
13#include <boost/foreach.hpp>
14#include "util/performance/performance_util.hpp"
23void StandardPerformanceGraph(std::string file_mean,
25 std::string file_mean_save,
26 std::string file_var_save,
39 y_ref_mean.load(file_mean);
40 y_ref_dev.load(file_var);
52 if (names.
size() == 0)
55 for (
size_t i = 0 ; i < names.
size() ; i++)
56 yn2.add(names.get(i));
58 for (
size_t i = 0; i < xp.
size() ; i++)
61 yp_mean.save(file_mean_save);
62 yp_dev.save(file_var_save);
64 if (y_ref_mean.
size() != 0 && yp_mean.size() != 0 && yp_mean.get(0).size() != 0)
71 for (
size_t i = 0 ; i < yp_mean.get(0).get(0).size() ; i++)
73 yn2.add(names.get(i));
78 y2.resize(yp_mean.size());
79 for (
size_t r = 0; r < yp_mean.size(); r++)
81 int warning_level = -1;
83 y2.get(r).resize(yp_mean.get(r).size());
84 for (
size_t k = 0; k < yp_mean.get(r).size(); k++)
88 for (
size_t g = 0 ; g < yp_mean.get(r).get(k).size() ; g++)
91 y2.get(r).get(k).add(yp_mean.get(r).get(k).get(g));
92 y2.get(r).get(k).add(y_ref_mean.get(r).get(k).get(g) - 3.0*y_ref_dev.get(r).get(k).get(g));
93 y2.get(r).get(k).add(y_ref_mean.get(r).get(k).get(g) + 3.0*y_ref_dev.get(r).get(k).get(g));
95 warning_set(warning_level,yp_mean.get(r).get(k).get(g),y_ref_mean.get(r).get(k).get(g),y_ref_dev.get(r).get(k).get(g));
99 warning_vlevel.add(warning_level);
112 options2.
yAxis = std::string(y_string);
113 options2.
xAxis = std::string(x_string);
116 for (
size_t i = 0; i < y2.
size() ; i++)
118 std::string chart_area;
119 if (warning_vlevel.
size() != 0)
120 addchartarea(chart_area,warning_vlevel.get(i));
123 {options2.
more = GC_Y_LOG +
"," + GC_ZOOM + chart_area;}
125 {options2.
more = GC_ZOOM + chart_area;}
127 options2.
title = gnames.get(i);
Small class to produce graph with Google chart in HTML.
void AddLinesGraph(openfpm::vector< X > &x, openfpm::vector< Y > &y, const GCoptions &opt)
Add a simple lines graph.
Implementation of 1-D std::vector like structure.
std::string xAxis
X axis name.
size_t lineWidth
Width of the line.
std::string title
Title of the chart.
std::string yAxis
Y axis name.