I'm trying to measure the performance of various chart configurations. To measure drawing time, I start a timer in the "BeforeDraw" event and stop it in "AfterDraw".
Is this a valid way to measure chart drawing time?
Timing chart performance?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Gp,
Yes, you could do something like this:
Yes, you could do something like this:
Code: Select all
private DateTime startTime, now;
private void tChart1_BeforeDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
startTime = DateTime.Now;
}
private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
//calculate elapsed time
now = DateTime.Now;
TimeSpan elapsedTime = new TimeSpan(now.Ticks - startTime.Ticks);
int total = (elapsedTime.Seconds * 1000) + elapsedTime.Milliseconds;
label1.Text="Elapsed time: " + total.ToString() + " ms";
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |