[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Wed Oct 26 19:35:31 CEST 2005


SVN commit 474545 by staikos:

add benchmarking


 M  +9 -4      kst2dplot.cpp  


--- trunk/extragear/graphics/kst/kst/kst2dplot.cpp #474544:474545
@@ -1903,15 +1903,17 @@
                          TickParameters &tpx,  TickParameters &tpy,
                          QPainter& p, bool& bOffsetX, bool& bOffsetY,
                           double xtick_len_px, double ytick_len_px) {
+#ifdef BENCHMARK
+  QTime t;
+  t.start();
+#endif
   double x_min, y_min, x_max, y_max;
-  int x_px, y_px;
-
   QRect v = p.window();
+  int x_px = v.width();
+  int y_px = v.height();
 
   bOffsetX = false;
   bOffsetY = false;
-  x_px = v.width();
-  y_px = v.height();
 
   getLScale(x_min, y_min, x_max, y_max);
   genAxisTickLabels(tpx, x_min, x_max, _xLog, _xAxisInterpretation, _xAxisDisplay,
@@ -2027,6 +2029,9 @@
   xright_bdr_px = ceil(xright_bdr_px);
   ytop_bdr_px   = ceil(ytop_bdr_px);
   ybot_bdr_px   = ceil(ybot_bdr_px);
+#ifdef BENCHMARK
+  kstdDebug() << "SET BORDERS CALLED on object " << tagName() << ", took " << t.elapsed() << endl;
+#endif
 }
 
 


More information about the Kst mailing list