Code Coverage Tools?

Is anyone aware of any open source static and/or dynamic code coverage tools for MUMPS programs?

like0

Comments

Code Coverage Tools?

DAVID Whitten's picture

On Thu, Apr 5, 2012 at 8:20 PM, David Whitten <whitten@worldvista.org>wrote:

> from http://www.assembla.com/spaces/Atmus/messages/453187
> [image: User picture]
> By K.S. Bhaskar <http://www.assembla.com/user/popup_profile/ksbhaskar> on
> May 04, 2009 @ 10:03am UTC
> GT.M already has code profiling
>
> GT.M has a good profiling capability. If you do something like:
>
> Set TraceStamp=$J_","_$H
> View TRACE:1:^TRACES(TraceStamp)
>
> ... execute code to be traced ...
>
> View TRACE:0:^TRACES(TraceStamp)
>
> Then dump ^TRACES(TraceStamp), you will get data for a code histogram. You
> can also put the trace information in a local variable, in case you don't
> want to save it past process exit.
>
> Our Profile programmers also used the trace capability to come up with a
> great tool to study test coverage and find code that is not exercised by
> automated tests (which can suggest the need for additional test cases, or
> perhaps a better compiler optimization, or perhaps unnecessary
> application logic). But this is not part of GT.M or PIP.
>
> Note that the histogram is useful, but the time stamps are always zero.
> This is because on any PC today, any line of M code executes in well under
> a microsecond, the resolution of a POSIX timer.
>
> Regards
> -- Bhaskar
> [image: User picture]
> By alexwoodhead <http://www.assembla.com/user/popup_profile/alexwoodhead> on
> May 04, 2009 @ 05:32am UTC
>
> Thanks for pointing this out.
> Found more details in the GTM programmers guide page 212.
>
> So the proposed profile tool would still be useful for code coverage
> provided by unit tests.
> Also it seems profiling tends to be done by process ($Job). This is fine
> for terminal type applications where a user is tied to a single mumps
> process. However it would also be useful to be able to profile by session
> context.
> For example:
> A user of a web application may have their pages served by many different
> mumps processes over the span of a web session.
> It would be nice to have a consistent session view of profile and code
> coverage.
> Maybe it would be useful to have a "profile" flag on a user web
> application account so when the web user is logged in, all their activity
> is profiled?
>
> [image: User picture]
> By K.S. Bhaskar <http://www.assembla.com/user/popup_profile/ksbhaskar> on
> May 04, 2009 @ 10:03am UTC
>
> This could be done as follows.
>
>
> - EWD passes an environment variable, say something like ewd_trace.
> - The GT.M process checks for this environment variable and turns
> tracing on, with the results going to a local variable. Before process
> exit, it merges the results into a global, such that the global has the
> session id as the first subscript and the $Job as the second subscript, and
> $H as the third subscript (or some such).
> - Since session ids are unique, this would give a complete profile of
> an entire web session.
>
>
> On Thu, Apr 5, 2012 at 6:02 PM, pbradley2525 <pbradley@raygroupintl.com>wrote:
>
>> Is anyone aware of any open source static and/or dynamic code coverage
>> tools for MUMPS programs?
>> --
>> Full post: http://www.osehra.org/discussion/code-coverage-tools
>> Manage my subscriptions:
>> http://www.osehra.org/og_mailinglist/subscriptions
>> Stop emails for this post:
>> http://www.osehra.org/og_mailinglist/unsubscribe/677
>>
>
>

like0

Code Coverage Tools?

Jignesh Patel's picture

David,

I do remember, you did mention that you do have developed plugin for
Eclipse so it can recognize mumps. If that is still available then we can
utilized code coverage tools which are readily available with eclipse.

-Jignesh

On Thu, Apr 5, 2012 at 9:08 PM, David Whitten <whitten@netcom.com> wrote:

>
>
> On Thu, Apr 5, 2012 at 8:20 PM, David Whitten <whitten@worldvista.org>wrote:
>
>> from http://www.assembla.com/spaces/Atmus/messages/453187
>> [image: User picture]
>> By K.S. Bhaskar <http://www.assembla.com/user/popup_profile/ksbhaskar> on
>> May 04, 2009 @ 10:03am UTC
>> GT.M already has code profiling
>>
>> GT.M has a good profiling capability. If you do something like:
>>
>> Set TraceStamp=$J_","_$H
>> View TRACE:1:^TRACES(TraceStamp)
>>
>> ... execute code to be traced ...
>>
>> View TRACE:0:^TRACES(TraceStamp)
>>
>> Then dump ^TRACES(TraceStamp), you will get data for a code histogram.
>> You can also put the trace information in a local variable, in case you
>> don't want to save it past process exit.
>>
>> Our Profile programmers also used the trace capability to come up with a
>> great tool to study test coverage and find code that is not exercised by
>> automated tests (which can suggest the need for additional test cases, or
>> perhaps a better compiler optimization, or perhaps unnecessary
>> application logic). But this is not part of GT.M or PIP.
>>
>> Note that the histogram is useful, but the time stamps are always zero.
>> This is because on any PC today, any line of M code executes in well under
>> a microsecond, the resolution of a POSIX timer.
>>
>> Regards
>> -- Bhaskar
>> [image: User picture]
>> By alexwoodhead<http://www.assembla.com/user/popup_profile/alexwoodhead> on
>> May 04, 2009 @ 05:32am UTC
>>
>> Thanks for pointing this out.
>> Found more details in the GTM programmers guide page 212.
>>
>> So the proposed profile tool would still be useful for code coverage
>> provided by unit tests.
>> Also it seems profiling tends to be done by process ($Job). This is fine
>> for terminal type applications where a user is tied to a single mumps
>> process. However it would also be useful to be able to profile by session
>> context.
>> For example:
>> A user of a web application may have their pages served by many different
>> mumps processes over the span of a web session.
>> It would be nice to have a consistent session view of profile and code
>> coverage.
>> Maybe it would be useful to have a "profile" flag on a user web
>> application account so when the web user is logged in, all their activity
>> is profiled?
>>
>> [image: User picture]
>> By K.S. Bhaskar <http://www.assembla.com/user/popup_profile/ksbhaskar> on
>> May 04, 2009 @ 10:03am UTC
>>
>> This could be done as follows.
>>
>>
>> - EWD passes an environment variable, say something like ewd_trace.
>> - The GT.M process checks for this environment variable and turns
>> tracing on, with the results going to a local variable. Before process
>> exit, it merges the results into a global, such that the global has the
>> session id as the first subscript and the $Job as the second subscript, and
>> $H as the third subscript (or some such).
>> - Since session ids are unique, this would give a complete profile of
>> an entire web session.
>>
>>
>> On Thu, Apr 5, 2012 at 6:02 PM, pbradley2525 <pbradley@raygroupintl.com>wrote:
>>
>>> Is anyone aware of any open source static and/or dynamic code coverage
>>> tools for MUMPS programs?
>>> --
>>> Full post: http://www.osehra.org/discussion/code-coverage-tools
>>> Manage my subscriptions:
>>> http://www.osehra.org/og_mailinglist/subscriptions
>>> Stop emails for this post:
>>> http://www.osehra.org/og_mailinglist/unsubscribe/677
>>>
>>
>>
>
> --
> Full post: http://www.osehra.org/discussion/code-coverage-tools
> Manage my subscriptions:
> http://www.osehra.org/og_mailinglist/subscriptions
> Stop emails for this post:
> http://www.osehra.org/og_mailinglist/unsubscribe/677
>

like0