Fork me on GitHub

Changeset 1205 in svn


Ignore:
Timestamp:
Jul 9, 2013, 11:01:17 PM (11 years ago)
Author:
Pavel Demin
Message:

set memory usage units to MB

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/MemoryUsage.C

    r1202 r1205  
    1212
    1313TGraph grvsz, grrss;
    14 TLegend legend(0.41, 0.58, 0.77, 0.67);
     14TLegend legend(0.41, 0.59, 0.77, 0.68);
    1515
    1616TCanvas *canvas;
     
    8989    in >> vsz  >> rss;
    9090    if(!in.good()) break;
    91     grvsz.SetPoint(i, (i-1)*0.1, vsz);
    92     grrss.SetPoint(i, (i-1)*0.1, rss);
     91    grvsz.SetPoint(i, (i-1)*0.1, vsz/1024.0);
     92    grrss.SetPoint(i, (i-1)*0.1, rss/1024.0);
    9393    ++i;
    9494  }
     95  grvsz.SetPoint(i, (i-1)*0.1, 0.0);
     96  grrss.SetPoint(i, (i-1)*0.1, 0.0);
    9597
    9698  grvsz.GetXaxis()->SetLimits(0, 30);
     
    98100  grvsz.GetYaxis()->SetTitleOffset(1.75);
    99101  grvsz.GetXaxis()->SetTitle("time, s");
    100   grvsz.GetYaxis()->SetTitle("memory usage, kB");
    101   grvsz.SetLineColor(kBlack);
     102  grvsz.GetYaxis()->SetTitle("memory usage, MB");
     103  grvsz.SetLineColor(16);
    102104  grrss.SetLineColor(kBlack);
    103   grvsz.SetLineStyle(kDashed);
     105  grvsz.SetLineStyle(kSolid);
    104106  grrss.SetLineStyle(kSolid);
    105107  grvsz.SetLineWidth(3);
Note: See TracChangeset for help on using the changeset viewer.