PercentSelect - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

CodeTools[Profiling][Coverage]

 PercentSelect
 select procedures based on their coverage percent

 Calling Sequence PercentSelect(proc1, proc1, ..., tab1, tab2, ..., opts)

Parameters

 proc1, proc2, ... - (optional) procedure tab1, tab2, ... - (optional) table of profiling data opts - (optional) equation(s) of the form option=value where option is one of the following 'compare', 'depth', or 'percent'; specify options for the PercentSelect command

Description

 • The PercentSelect() command selects from the procedures for which it has profiling data those procedures that satisfy the coverage percent comparison.
 The coverage percent of a procedure is the number of lines covered divided by the total number of lines in the procedure.
 • The PercentSelect(proc1, proc2, ...) command selects from the specified procedures, proc1, proc2, ..., those procedures that satisfy the coverage percent comparison.
 • The opts parameter can contain any of the following equations that specify options for the PercentSelect command.
 'compare'=procedure
 Specifies a comparison procedure.  The 'compare' option can be any boolean valued procedure that accepts two numeric arguments.  The first is the calculated coverage percentage, the second is the specified percentage.  By default, <= is used.
 'depth'=posint
 Specifies the number of times that a statement has to be executed to be considered covered.  A statement is considered covered if it is executed greater than or equal to a certain number of times.  The default is one.
 'percent'=numeric
 Specifies the percentage to which to compare.  It is specified as a number in the range 0 to 1. The default is 0.5.
 • PercentSelect reads profiling data from currently profiled procedures and from any specified tables of profiling data.  If a procedure appears more than once in any of these sources, the profiles are joined together (as in Merge) and the data from the merged profiles is used.
 • PercentSelect returns a table containing the profiling data for the selected procedures.

Examples

 > $\mathrm{with}\left(\mathrm{CodeTools}\left[\mathrm{Profiling}\right]\right):$
 > $\mathrm{t1}≔\mathrm{Build}\left(\mathrm{commands}='\mathrm{limit}\left(\frac{\mathrm{sin}\left(x\right)}{x},x=0\right)'\right):$
 > $\mathrm{Coverage}\left[\mathrm{Percent}\right]\left(\mathrm{t1}\right)$
 simplify/evenodd 66.67% simplify/getinds 100.00% ListTools:-Classify 80.00% limit/mrv/Testzero 3.33% hasassumptions 50.00% simplify/trig/to_sincos 50.00% simplify/sortinds 100.00% limit/mrv/PreProcess0 46.67% combine/wrt 64.71% tools/truncateSeries 23.81% limit/mrv/compare0 16.67% type/laurent 100.00% simplify/evenodd/do 57.14% type/arctrig 66.67% simplify/size/length 100.00% type/simplify/* 100.00% limit/mrv/mrv0 47.06% PackageManagement:-pmember 11.76% trig/normal 4.35% forget:-forget_proc 51.85% limit/mrv/compare 100.00% simplify/trig/multiply_and_choose 50.00% simplify/trig/evenodd 12.50% convert/list:-ModuleApply 9.52% simplify/normal/check 23.33% simplify/do 29.90% simplify/trig/normalize_args/1 37.50% @ 26.83% type/arctrigh 66.67% type/suffixed 10.53% tools/eval_foo/do 35.71% simplify/trig/combine/type 87.50% simplify/normal 38.46% type/simplify/+ 100.00% simplify/common_factors/mulI 11.76% limit/MrvLimit 13.04% type/trig 100.00% combine/cmbpwr 43.75% type/polynom 53.85% type/appliable 16.67% simplify/getkernels 100.00% simplify/size/size/object 18.75% limit/mrv/EXP 75.00% limit/MrvRight0 51.35% series/trig 50.00% type/SymbolicInfinity 100.00% limit/mrv/limsimpl 30.95% simplify/trig/combine 90.00% type/builtin 100.00% tools/membertype 100.00% trig/linear_in_Pi 50.00% depends:-ModuleApply 75.00% limit 17.01% type/nothing 100.00% tools/sign 19.05% limit/topright 14.08% simplify/check_constant 66.67% type/point 50.00% limit/easy 52.94% limit/mrv/MrvLeadTerm0 10.28% packages 100.00% type/algnum 33.33% limit/limit/piecewise 12.00% limit/MrvLimit0 42.86% simplify/trig/power 71.43% limit/mrv/MrvLeadTerm 100.00% simplify/nosize 100.00% limit/mrv/LeadingExpon 37.50% forget:-ModuleApply 44.00% tools/map/function 27.27% limit/ThawRange 100.00% simplify 31.03% simplify/trig/from_sincos 100.00% limit/MrvRight/limsimp 57.14% simplify/common_factors 100.00% combine 63.89% anames 100.00% limit/mrv/mrv 100.00% expand/cos 18.75% tools/map 15.52% simplify/common_factors/recurse 2.90% collect/recursive 8.00% simplify/trig 40.00% series/leadterm 46.07% simplify/trig/do/1 58.09% simplify/trig/normalize_args 35.90% limit/dosubs 42.31% limit/return 75.00% simplify/trig/do 100.00% simplify/trig/recurse 15.79% convert/sincos 50.00% depends:-Main 36.67% type/typefunc 100.00% limit/mrv/commonfactors 100.00% series/sin 75.00% limit/left=right 7.14% type/taylor 100.00% series/frontend 100.00% limit/MrvRight 100.00% collect 54.17% tools/eval_foo 48.15% type/freeof 60.00% limit/IndetsRange 100.00% factor 50.00% ListTools:-Reverse 100.00% sin/normal 57.14% combine/power 37.75% simplify/size/size 46.15% signum 9.72% expand/sin 18.75% forget:-do_unread 66.67%
 > $\mathrm{t2}≔\mathrm{Coverage}\left[\mathrm{PercentSelect}\right]\left(\mathrm{t1},'\mathrm{percent}'=0.3\right):$
 > $\mathrm{Coverage}\left[\mathrm{Percent}\right]\left(\mathrm{t2}\right)$
 limit/mrv/Testzero 3.33% tools/truncateSeries 23.81% limit/mrv/compare0 16.67% PackageManagement:-pmember 11.76% trig/normal 4.35% simplify/trig/evenodd 12.50% convert/list:-ModuleApply 9.52% simplify/normal/check 23.33% simplify/do 29.90% @ 26.83% type/suffixed 10.53% simplify/common_factors/mulI 11.76% limit/MrvLimit 13.04% type/appliable 16.67% simplify/size/size/object 18.75% limit 17.01% tools/sign 19.05% limit/topright 14.08% limit/mrv/MrvLeadTerm0 10.28% limit/limit/piecewise 12.00% tools/map/function 27.27% expand/cos 18.75% tools/map 15.52% simplify/common_factors/recurse 2.90% collect/recursive 8.00% simplify/trig/recurse 15.79% limit/left=right 7.14% signum 9.72% expand/sin 18.75%
 > $\mathrm{t2}≔\mathrm{Coverage}\left[\mathrm{PercentSelect}\right]\left(\mathrm{t1}\right):$
 > $\mathrm{Coverage}\left[\mathrm{Percent}\right]\left(\mathrm{t2}\right)$
 limit/mrv/Testzero 3.33% hasassumptions 50.00% simplify/trig/to_sincos 50.00% limit/mrv/PreProcess0 46.67% tools/truncateSeries 23.81% limit/mrv/compare0 16.67% limit/mrv/mrv0 47.06% PackageManagement:-pmember 11.76% trig/normal 4.35% simplify/trig/multiply_and_choose 50.00% simplify/trig/evenodd 12.50% convert/list:-ModuleApply 9.52% simplify/normal/check 23.33% simplify/do 29.90% simplify/trig/normalize_args/1 37.50% @ 26.83% type/suffixed 10.53% tools/eval_foo/do 35.71% simplify/normal 38.46% simplify/common_factors/mulI 11.76% limit/MrvLimit 13.04% combine/cmbpwr 43.75% type/appliable 16.67% simplify/size/size/object 18.75% series/trig 50.00% limit/mrv/limsimpl 30.95% trig/linear_in_Pi 50.00% limit 17.01% tools/sign 19.05% limit/topright 14.08% type/point 50.00% limit/mrv/MrvLeadTerm0 10.28% type/algnum 33.33% limit/limit/piecewise 12.00% limit/MrvLimit0 42.86% limit/mrv/LeadingExpon 37.50% forget:-ModuleApply 44.00% tools/map/function 27.27% simplify 31.03% expand/cos 18.75% tools/map 15.52% simplify/common_factors/recurse 2.90% collect/recursive 8.00% simplify/trig 40.00% series/leadterm 46.07% simplify/trig/normalize_args 35.90% limit/dosubs 42.31% simplify/trig/recurse 15.79% convert/sincos 50.00% depends:-Main 36.67% limit/left=right 7.14% tools/eval_foo 48.15% factor 50.00% combine/power 37.75% simplify/size/size 46.15% signum 9.72% expand/sin 18.75%
 > $\mathrm{t2}≔\mathrm{Coverage}\left[\mathrm{PercentSelect}\right]\left(\mathrm{t1},'\mathrm{percent}'=0.80\right):$
 > $\mathrm{Coverage}\left[\mathrm{Percent}\right]\left(\mathrm{t2}\right)$
 simplify/evenodd 66.67% ListTools:-Classify 80.00% limit/mrv/Testzero 3.33% hasassumptions 50.00% simplify/trig/to_sincos 50.00% limit/mrv/PreProcess0 46.67% combine/wrt 64.71% tools/truncateSeries 23.81% limit/mrv/compare0 16.67% simplify/evenodd/do 57.14% type/arctrig 66.67% limit/mrv/mrv0 47.06% PackageManagement:-pmember 11.76% trig/normal 4.35% forget:-forget_proc 51.85% simplify/trig/multiply_and_choose 50.00% simplify/trig/evenodd 12.50% convert/list:-ModuleApply 9.52% simplify/normal/check 23.33% simplify/do 29.90% simplify/trig/normalize_args/1 37.50% @ 26.83% type/arctrigh 66.67% type/suffixed 10.53% tools/eval_foo/do 35.71% simplify/normal 38.46% simplify/common_factors/mulI 11.76% limit/MrvLimit 13.04% combine/cmbpwr 43.75% type/polynom 53.85% type/appliable 16.67% simplify/size/size/object 18.75% limit/mrv/EXP 75.00% limit/MrvRight0 51.35% series/trig 50.00% limit/mrv/limsimpl 30.95% trig/linear_in_Pi 50.00% depends:-ModuleApply 75.00% limit 17.01% tools/sign 19.05% limit/topright 14.08% simplify/check_constant 66.67% type/point 50.00% limit/easy 52.94% limit/mrv/MrvLeadTerm0 10.28% type/algnum 33.33% limit/limit/piecewise 12.00% limit/MrvLimit0 42.86% simplify/trig/power 71.43% limit/mrv/LeadingExpon 37.50% forget:-ModuleApply 44.00% tools/map/function 27.27% simplify 31.03% limit/MrvRight/limsimp 57.14% combine 63.89% expand/cos 18.75% tools/map 15.52% simplify/common_factors/recurse 2.90% collect/recursive 8.00% simplify/trig 40.00% series/leadterm 46.07% simplify/trig/do/1 58.09% simplify/trig/normalize_args 35.90% limit/dosubs 42.31% limit/return 75.00% simplify/trig/recurse 15.79% convert/sincos 50.00% depends:-Main 36.67% series/sin 75.00% limit/left=right 7.14% collect 54.17% tools/eval_foo 48.15% type/freeof 60.00% factor 50.00% sin/normal 57.14% combine/power 37.75% simplify/size/size 46.15% signum 9.72% expand/sin 18.75% forget:-do_unread 66.67%
 > $\mathrm{t2}≔\mathrm{Coverage}\left[\mathrm{PercentSelect}\right]\left(\mathrm{t1},'\mathrm{percent}'=0.80,'\mathrm{compare}'=\mathrm{>}\right):$
 > $\mathrm{Coverage}\left[\mathrm{Percent}\right]\left(\mathrm{t2}\right)$
 simplify/getinds 100.00% simplify/sortinds 100.00% type/laurent 100.00% simplify/size/length 100.00% type/simplify/* 100.00% limit/mrv/compare 100.00% simplify/trig/combine/type 87.50% type/simplify/+ 100.00% type/trig 100.00% simplify/getkernels 100.00% type/SymbolicInfinity 100.00% simplify/trig/combine 90.00% type/builtin 100.00% tools/membertype 100.00% type/nothing 100.00% packages 100.00% limit/mrv/MrvLeadTerm 100.00% simplify/nosize 100.00% limit/ThawRange 100.00% simplify/trig/from_sincos 100.00% simplify/common_factors 100.00% anames 100.00% limit/mrv/mrv 100.00% simplify/trig/do 100.00% type/typefunc 100.00% limit/mrv/commonfactors 100.00% type/taylor 100.00% series/frontend 100.00% limit/MrvRight 100.00% limit/IndetsRange 100.00% ListTools:-Reverse 100.00%
 > $\mathrm{Coverage}\left[\mathrm{Percent}\right]\left(\mathrm{t1},'\mathrm{depth}'=2\right)$
 simplify/evenodd 66.67% simplify/getinds 100.00% ListTools:-Classify 0.00% limit/mrv/Testzero 3.33% hasassumptions 0.00% simplify/trig/to_sincos 0.00% simplify/sortinds 20.00% limit/mrv/PreProcess0 46.67% combine/wrt 64.71% tools/truncateSeries 23.81% limit/mrv/compare0 0.00% type/laurent 100.00% simplify/evenodd/do 57.14% type/arctrig 66.67% simplify/size/length 100.00% type/simplify/* 0.00% limit/mrv/mrv0 8.82% PackageManagement:-pmember 0.00% trig/normal 4.35% forget:-forget_proc 0.00% limit/mrv/compare 0.00% simplify/trig/multiply_and_choose 0.00% simplify/trig/evenodd 0.00% convert/list:-ModuleApply 4.76% simplify/normal/check 3.33% simplify/do 24.23% simplify/trig/normalize_args/1 0.00% @ 2.44% type/arctrigh 0.00% type/suffixed 0.00% tools/eval_foo/do 0.00% simplify/trig/combine/type 25.00% simplify/normal 38.46% type/simplify/+ 0.00% simplify/common_factors/mulI 11.76% limit/MrvLimit 0.00% type/trig 100.00% combine/cmbpwr 0.00% type/polynom 7.69% type/appliable 16.67% simplify/getkernels 100.00% simplify/size/size/object 18.75% limit/mrv/EXP 0.00% limit/MrvRight0 0.00% series/trig 45.45% type/SymbolicInfinity 100.00% limit/mrv/limsimpl 19.05% simplify/trig/combine 0.00% type/builtin 0.00% tools/membertype 100.00% trig/linear_in_Pi 50.00% depends:-ModuleApply 62.50% limit 0.00% type/nothing 100.00% tools/sign 19.05% limit/topright 14.08% simplify/check_constant 66.67% type/point 0.00% limit/easy 0.00% limit/mrv/MrvLeadTerm0 0.40% packages 0.00% type/algnum 0.00% limit/limit/piecewise 12.00% limit/MrvLimit0 0.00% simplify/trig/power 42.86% limit/mrv/MrvLeadTerm 100.00% simplify/nosize 100.00% limit/mrv/LeadingExpon 0.00% forget:-ModuleApply 0.00% tools/map/function 0.00% limit/ThawRange 0.00% simplify 31.03% simplify/trig/from_sincos 100.00% limit/MrvRight/limsimp 0.00% simplify/common_factors 100.00% combine 47.22% anames 100.00% limit/mrv/mrv 100.00% expand/cos 0.00% tools/map 6.90% simplify/common_factors/recurse 0.00% collect/recursive 8.00% simplify/trig 0.00% series/leadterm 8.99% simplify/trig/do/1 4.41% simplify/trig/normalize_args 0.00% limit/dosubs 42.31% limit/return 0.00% simplify/trig/do 0.00% simplify/trig/recurse 0.00% convert/sincos 0.00% depends:-Main 36.67% type/typefunc 100.00% limit/mrv/commonfactors 0.00% series/sin 75.00% limit/left=right 0.00% type/taylor 100.00% series/frontend 100.00% limit/MrvRight 100.00% collect 54.17% tools/eval_foo 3.70% type/freeof 60.00% limit/IndetsRange 100.00% factor 0.00% ListTools:-Reverse 0.00% sin/normal 57.14% combine/power 31.13% simplify/size/size 7.69% signum 9.72% expand/sin 0.00% forget:-do_unread 0.00%
 > $\mathrm{t2}≔\mathrm{Coverage}\left[\mathrm{PercentSelect}\right]\left(\mathrm{t1},'\mathrm{depth}'=2,'\mathrm{percent}'=0.3\right):$
 > $\mathrm{Coverage}\left[\mathrm{Percent}\right]\left(\mathrm{t2},'\mathrm{depth}'=2\right)$
 ListTools:-Classify 0.00% limit/mrv/Testzero 3.33% hasassumptions 0.00% simplify/trig/to_sincos 0.00% simplify/sortinds 20.00% tools/truncateSeries 23.81% limit/mrv/compare0 0.00% type/simplify/* 0.00% limit/mrv/mrv0 8.82% PackageManagement:-pmember 0.00% trig/normal 4.35% forget:-forget_proc 0.00% limit/mrv/compare 0.00% simplify/trig/multiply_and_choose 0.00% simplify/trig/evenodd 0.00% convert/list:-ModuleApply 4.76% simplify/normal/check 3.33% simplify/do 24.23% simplify/trig/normalize_args/1 0.00% @ 2.44% type/arctrigh 0.00% type/suffixed 0.00% tools/eval_foo/do 0.00% simplify/trig/combine/type 25.00% type/simplify/+ 0.00% simplify/common_factors/mulI 11.76% limit/MrvLimit 0.00% combine/cmbpwr 0.00% type/polynom 7.69% type/appliable 16.67% simplify/size/size/object 18.75% limit/mrv/EXP 0.00% limit/MrvRight0 0.00% limit/mrv/limsimpl 19.05% simplify/trig/combine 0.00% type/builtin 0.00% limit 0.00% tools/sign 19.05% limit/topright 14.08% type/point 0.00% limit/easy 0.00% limit/mrv/MrvLeadTerm0 0.40% packages 0.00% type/algnum 0.00% limit/limit/piecewise 12.00% limit/MrvLimit0 0.00% limit/mrv/LeadingExpon 0.00% forget:-ModuleApply 0.00% tools/map/function 0.00% limit/ThawRange 0.00% limit/MrvRight/limsimp 0.00% expand/cos 0.00% tools/map 6.90% simplify/common_factors/recurse 0.00% collect/recursive 8.00% simplify/trig 0.00% series/leadterm 8.99% simplify/trig/do/1 4.41% simplify/trig/normalize_args 0.00% limit/return 0.00% simplify/trig/do 0.00% simplify/trig/recurse 0.00% convert/sincos 0.00% limit/mrv/commonfactors 0.00% limit/left=right 0.00% tools/eval_foo 3.70% factor 0.00% ListTools:-Reverse 0.00% simplify/size/size 7.69% signum 9.72% expand/sin 0.00% forget:-do_unread 0.00%
 > $\mathrm{t2}≔\mathrm{Coverage}\left[\mathrm{PercentSelect}\right]\left(\mathrm{t1},'\mathrm{depth}'=2,'\mathrm{compare}'=\mathrm{=}\right):$
 > $\mathrm{Coverage}\left[\mathrm{Percent}\right]\left(\mathrm{t2},'\mathrm{depth}'=2\right)$
 trig/linear_in_Pi 50.00%
 > $\mathrm{t2}≔\mathrm{Coverage}\left[\mathrm{PercentSelect}\right]\left(\mathrm{t1},'\mathrm{depth}'=2,'\mathrm{percent}'=0.80\right):$
 > $\mathrm{Coverage}\left[\mathrm{Percent}\right]\left(\mathrm{t2},'\mathrm{depth}'=2\right)$
 simplify/evenodd 66.67% ListTools:-Classify 0.00% limit/mrv/Testzero 3.33% hasassumptions 0.00% simplify/trig/to_sincos 0.00% simplify/sortinds 20.00% limit/mrv/PreProcess0 46.67% combine/wrt 64.71% tools/truncateSeries 23.81% limit/mrv/compare0 0.00% simplify/evenodd/do 57.14% type/arctrig 66.67% type/simplify/* 0.00% limit/mrv/mrv0 8.82% PackageManagement:-pmember 0.00% trig/normal 4.35% forget:-forget_proc 0.00% limit/mrv/compare 0.00% simplify/trig/multiply_and_choose 0.00% simplify/trig/evenodd 0.00% convert/list:-ModuleApply 4.76% simplify/normal/check 3.33% simplify/do 24.23% simplify/trig/normalize_args/1 0.00% @ 2.44% type/arctrigh 0.00% type/suffixed 0.00% tools/eval_foo/do 0.00% simplify/trig/combine/type 25.00% simplify/normal 38.46% type/simplify/+ 0.00% simplify/common_factors/mulI 11.76% limit/MrvLimit 0.00% combine/cmbpwr 0.00% type/polynom 7.69% type/appliable 16.67% simplify/size/size/object 18.75% limit/mrv/EXP 0.00% limit/MrvRight0 0.00% series/trig 45.45% limit/mrv/limsimpl 19.05% simplify/trig/combine 0.00% type/builtin 0.00% trig/linear_in_Pi 50.00% depends:-ModuleApply 62.50% limit 0.00% tools/sign 19.05% limit/topright 14.08% simplify/check_constant 66.67% type/point 0.00% limit/easy 0.00% limit/mrv/MrvLeadTerm0 0.40% packages 0.00% type/algnum 0.00% limit/limit/piecewise 12.00% limit/MrvLimit0 0.00% simplify/trig/power 42.86% limit/mrv/LeadingExpon 0.00% forget:-ModuleApply 0.00% tools/map/function 0.00% limit/ThawRange 0.00% simplify 31.03% limit/MrvRight/limsimp 0.00% combine 47.22% expand/cos 0.00% tools/map 6.90% simplify/common_factors/recurse 0.00% collect/recursive 8.00% simplify/trig 0.00% series/leadterm 8.99% simplify/trig/do/1 4.41% simplify/trig/normalize_args 0.00% limit/dosubs 42.31% limit/return 0.00% simplify/trig/do 0.00% simplify/trig/recurse 0.00% convert/sincos 0.00% depends:-Main 36.67% limit/mrv/commonfactors 0.00% series/sin 75.00% limit/left=right 0.00% collect 54.17% tools/eval_foo 3.70% type/freeof 60.00% factor 0.00% ListTools:-Reverse 0.00% sin/normal 57.14% combine/power 31.13% simplify/size/size 7.69% signum 9.72% expand/sin 0.00% forget:-do_unread 0.00%