81 lines
2.2 KiB
C++
81 lines
2.2 KiB
C++
|
void SenderBufSize() {
|
||
|
auto filename = "./send_data_buffer.csv";
|
||
|
auto df = ROOT::RDF::MakeCsvDataFrame(filename, true, ';');
|
||
|
auto newcol = df.Define("bandwidth", "100*1024/time").Define("bf_kb", "buffer_size/static_cast<double>(1024)");
|
||
|
|
||
|
//TPad (const char *name, const char *title, Double_t xlow, Double_t ylow, Double_t xup, Double_t yup, Color_t color=-1, Short_t bordersize=-1, Short_t bordermode=-2)
|
||
|
|
||
|
|
||
|
auto canvas = new TCanvas();
|
||
|
//canvas->SetLogx();
|
||
|
//canvas->SetLogy();
|
||
|
|
||
|
auto graph1 = newcol.Graph("bf_kb", "bandwidth");
|
||
|
auto graph2 = newcol.Graph("bf_kb", "bandwidth");
|
||
|
|
||
|
//graph1->SetTitle("Bandwidth vs Sender Buffer Size;Buffer Size [kB];Bandwidth [kB/s]");
|
||
|
graph2->SetTitle("Bandwidth vs Sender Buffer Size;Buffer Size [kB];Bandwidth [kB/s]");
|
||
|
graph1->SetTitle("");
|
||
|
//graph2->SetTitle("");
|
||
|
|
||
|
graph1->GetXaxis()->SetLimits(0,0.7);
|
||
|
graph2->GetXaxis()->SetLimits(0.7,1e3);
|
||
|
graph1->GetYaxis()->SetLimits(0,1e6);
|
||
|
graph2->GetYaxis()->SetLimits(0,1e6);
|
||
|
|
||
|
|
||
|
|
||
|
//auto printable = newcol.Display();
|
||
|
//printable->Print();
|
||
|
|
||
|
// Make the plot esthetically better
|
||
|
//It's kMultiply a lil bigger
|
||
|
//graph1->GetYaxis()->SetLabelSize(0);
|
||
|
//graph1->GetYaxis()->SetTickLength(0);
|
||
|
graph1->GetXaxis()->SetNdivisions(0);
|
||
|
graph1->SetMarkerStyle(52);
|
||
|
graph1->SetMarkerSize(1.5);
|
||
|
graph1->SetMarkerColor(kBlack);
|
||
|
graph1->SetLineColor(kBlue);
|
||
|
|
||
|
//graph2->GetYaxis()->SetLabelSize(0);
|
||
|
//graph2->GetYaxis()->SetTickLength(0);
|
||
|
graph2->SetMarkerStyle(52);
|
||
|
graph2->SetMarkerSize(1.5);
|
||
|
graph2->SetMarkerColor(kBlack);
|
||
|
graph2->SetLineColor(kBlue);
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
auto pad1 = new TPad("p1","p1",0.05,0.05,0.2,0.95);
|
||
|
pad1->SetRightMargin(0.);
|
||
|
pad1->SetFillColor(0);
|
||
|
pad1->SetBorderMode(0);
|
||
|
pad1->SetLogy();
|
||
|
pad1->Draw();
|
||
|
|
||
|
|
||
|
auto pad2 = new TPad("p2","p2",0.205,0.05,0.95,0.95);
|
||
|
pad2->SetLeftMargin(0.);
|
||
|
pad2->SetFillColor(0);
|
||
|
pad2->SetBorderMode(0);
|
||
|
pad2->SetLogx();
|
||
|
pad2->SetLogy();
|
||
|
pad2->Draw();
|
||
|
|
||
|
pad1->cd();
|
||
|
graph1->DrawClone("ALP");
|
||
|
|
||
|
pad2->cd();
|
||
|
graph2->DrawClone("ALP");
|
||
|
|
||
|
canvas->Modified();
|
||
|
canvas->Update();
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
//graph->DrawClone("ALP");
|
||
|
//gApplication->Terminate(0);
|
||
|
}
|