From: Thomas Marullo on 6 Jul 2010 09:50 Is there a way to trace the execution times of blocks and/or lines of code when using xPC? I want to find out how well my model is executing and while the TET metrics are useful, I really want to find out where the bottlenecks are in my code.
From: Gordon Weast on 6 Jul 2010 11:43 Thomas, In xpclib/Misc the Time Stamp Counter block reads the Pentium time stamp counter. That counter runs at the CPU clock speed. The block runs after the input data dependency is met, but check the sorted order to make sure. The Time Stamp Delta block differences two values to get the time between counter reads. You will need to divide by the CPU clock frequency to get seconds. Reading the Pentium counter only adds a very small amount of execution time to the model. Gordon Weast xPC Target Development The MathWorks Thomas Marullo wrote: > Is there a way to trace the execution times of blocks and/or lines of > code when using xPC? I want to find out how well my model is executing > and while the TET metrics are useful, I really want to find out where > the bottlenecks are in my code.
From: Thomas Marullo on 6 Jul 2010 11:49 Thanks. Is there something that can be used inside an Embedded Matlab Function also? Gordon Weast <gweast(a)mathworks.com> wrote in message <i0vivt$k3p$1(a)fred.mathworks.com>... > Thomas, > > In xpclib/Misc the Time Stamp Counter block reads the Pentium time stamp > counter. That counter runs at the CPU clock speed. The block runs > after the input data dependency is met, but check the sorted order > to make sure. The Time Stamp Delta block differences two values to > get the time between counter reads. You will need to divide by the > CPU clock frequency to get seconds. > > Reading the Pentium counter only adds a very small amount of execution > time to the model. > > Gordon Weast > xPC Target Development > The MathWorks > > > Thomas Marullo wrote: > > Is there a way to trace the execution times of blocks and/or lines of > > code when using xPC? I want to find out how well my model is executing > > and while the TET metrics are useful, I really want to find out where > > the bottlenecks are in my code.
From: Gordon Weast on 6 Jul 2010 13:06 Thomas, Not that I know of. Gordon Weast xPC Target Development The MathWorks Thomas Marullo wrote: > Thanks. Is there something that can be used inside an Embedded Matlab > Function also? > > Gordon Weast <gweast(a)mathworks.com> wrote in message > <i0vivt$k3p$1(a)fred.mathworks.com>... >> Thomas, >> >> In xpclib/Misc the Time Stamp Counter block reads the Pentium time stamp >> counter. That counter runs at the CPU clock speed. The block runs >> after the input data dependency is met, but check the sorted order >> to make sure. The Time Stamp Delta block differences two values to >> get the time between counter reads. You will need to divide by the >> CPU clock frequency to get seconds. >> >> Reading the Pentium counter only adds a very small amount of execution >> time to the model. >> >> Gordon Weast >> xPC Target Development >> The MathWorks >> >> >> Thomas Marullo wrote: >> > Is there a way to trace the execution times of blocks and/or lines of >> > code when using xPC? I want to find out how well my model is executing >> > and while the TET metrics are useful, I really want to find out where >> > the bottlenecks are in my code.
|
Pages: 1 Prev: Equispaced Vector Error Next: diffusion tensor visualization with matlab |