CodeTools[Profiling][Coverage]
PercentSelect
select procedures based on their coverage percent
Calling Sequence
Parameters
Description
Examples
PercentSelect(proc1, proc1, ..., tab1, tab2, ..., opts)
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
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.
with⁡CodeToolsProfiling:
t1≔Build⁡commands=limit⁡sin⁡xx,x=0:
CoveragePercent⁡t1
limit/mrv/LeadingExpon 37.50% simplify/evenodd 66.67% limit/dosubs 42.31% simplify/trig/multiply_and_choose 80.00% type/algnum 33.33% combine/cmbpwr 53.85% limit/easy 52.94% limit/MrvLimit 13.48% series/leadterm 46.07% depends:-Main 36.67% simplify/normal 38.46% series/frontend 100.00% `convert/list`:-ModuleApply 7.32% depends:-ModuleApply 71.43% trig/normal 3.12% limit/mrv/limsimpl 30.95% simplify/nosize 100.00% limit/MrvRight0 45.45% simplify/trig 52.73% limit/mrv/Testzero 3.57% anames 100.00% convert/sincos 50.00% ceil 10.26% combine 51.52% type/taylor 100.00% simplify/RootOf 10.64% PackageManagement:-pmember 11.76% simplify/size/length 100.00% tools/eval_foo/do 35.71% limit/mrv/EXP 75.00% type/arctrigh 66.67% limit/mrv/PreProcess0 46.67% limit/return 75.00% combine/power 31.43% type/nothing 100.00% limit/mrv/MrvLeadTerm0 10.53% simplify/evenodd/do 57.14% tools/membertype 100.00% forget:-do_unread 66.67% ListTools:-Reverse 100.00% simplify/normal/check 23.33% type/simplify/+ 100.00% forget:-ModuleApply 44.00% packages 100.00% series/sin 75.00% hasassumptions 50.00% tools/truncateSeries 23.81% type/simplify/* 100.00% expand/sin 18.75% type/point 50.00% limit/mrv/mrv0 47.06% limit/MrvLimit0 42.86% tools/eval_foo 59.09% expand/cos 18.75% limit/limit/piecewise 12.00% simplify 26.92% simplify/trig/recurse 25.00% limit/MrvRight 100.00% type/builtin 100.00% limit/mrv/compare 100.00% type/polynom 53.85% limit/mrv/MrvLeadTerm 100.00% sin/normal 57.14% limit/mrv/mrv 100.00% type/freeof 60.00% simplify/trig/evenodd 12.50% collect/recursive 8.70% tools/sign 19.05% limit 19.03% limit/IndetsRange 100.00% type/SymbolicInfinity 100.00% tools/map/function 37.50% forget:-forget_proc 51.85% trig/linear_in_Pi 50.00% limit/topright 14.08% limit/ThawRange 100.00% limit/MrvRight/limsimp 57.14% type/suffixed 8.57% tools/map 3.64% signum 9.86% type/arctrig 66.67% combine/wrt 64.71% limit/left=right 7.14% simplify/do 16.81% series/trig 50.00% factor 3.53% @ 26.83% limit/mrv/compare0 16.67% collect 57.14% type/laurent 100.00%
t2≔CoveragePercentSelect⁡t1,percent=0.3:
CoveragePercent⁡t2
limit/MrvLimit 13.48% `convert/list`:-ModuleApply 7.32% trig/normal 3.12% limit/mrv/Testzero 3.57% ceil 10.26% simplify/RootOf 10.64% PackageManagement:-pmember 11.76% limit/mrv/MrvLeadTerm0 10.53% simplify/normal/check 23.33% tools/truncateSeries 23.81% expand/sin 18.75% expand/cos 18.75% limit/limit/piecewise 12.00% simplify 26.92% simplify/trig/recurse 25.00% simplify/trig/evenodd 12.50% collect/recursive 8.70% tools/sign 19.05% limit 19.03% limit/topright 14.08% type/suffixed 8.57% tools/map 3.64% signum 9.86% limit/left=right 7.14% simplify/do 16.81% factor 3.53% @ 26.83% limit/mrv/compare0 16.67%
t2≔CoveragePercentSelect⁡t1:
limit/mrv/LeadingExpon 37.50% limit/dosubs 42.31% type/algnum 33.33% limit/MrvLimit 13.48% series/leadterm 46.07% depends:-Main 36.67% simplify/normal 38.46% `convert/list`:-ModuleApply 7.32% trig/normal 3.12% limit/mrv/limsimpl 30.95% limit/MrvRight0 45.45% limit/mrv/Testzero 3.57% convert/sincos 50.00% ceil 10.26% simplify/RootOf 10.64% PackageManagement:-pmember 11.76% tools/eval_foo/do 35.71% limit/mrv/PreProcess0 46.67% combine/power 31.43% limit/mrv/MrvLeadTerm0 10.53% simplify/normal/check 23.33% forget:-ModuleApply 44.00% hasassumptions 50.00% tools/truncateSeries 23.81% expand/sin 18.75% type/point 50.00% limit/mrv/mrv0 47.06% limit/MrvLimit0 42.86% expand/cos 18.75% limit/limit/piecewise 12.00% simplify 26.92% simplify/trig/recurse 25.00% simplify/trig/evenodd 12.50% collect/recursive 8.70% tools/sign 19.05% limit 19.03% tools/map/function 37.50% trig/linear_in_Pi 50.00% limit/topright 14.08% type/suffixed 8.57% tools/map 3.64% signum 9.86% limit/left=right 7.14% simplify/do 16.81% series/trig 50.00% factor 3.53% @ 26.83% limit/mrv/compare0 16.67%
t2≔CoveragePercentSelect⁡t1,percent=0.80:
limit/mrv/LeadingExpon 37.50% simplify/evenodd 66.67% limit/dosubs 42.31% simplify/trig/multiply_and_choose 80.00% type/algnum 33.33% combine/cmbpwr 53.85% limit/easy 52.94% limit/MrvLimit 13.48% series/leadterm 46.07% depends:-Main 36.67% simplify/normal 38.46% `convert/list`:-ModuleApply 7.32% depends:-ModuleApply 71.43% trig/normal 3.12% limit/mrv/limsimpl 30.95% limit/MrvRight0 45.45% simplify/trig 52.73% limit/mrv/Testzero 3.57% convert/sincos 50.00% ceil 10.26% combine 51.52% simplify/RootOf 10.64% PackageManagement:-pmember 11.76% tools/eval_foo/do 35.71% limit/mrv/EXP 75.00% type/arctrigh 66.67% limit/mrv/PreProcess0 46.67% limit/return 75.00% combine/power 31.43% limit/mrv/MrvLeadTerm0 10.53% simplify/evenodd/do 57.14% forget:-do_unread 66.67% simplify/normal/check 23.33% forget:-ModuleApply 44.00% series/sin 75.00% hasassumptions 50.00% tools/truncateSeries 23.81% expand/sin 18.75% type/point 50.00% limit/mrv/mrv0 47.06% limit/MrvLimit0 42.86% tools/eval_foo 59.09% expand/cos 18.75% limit/limit/piecewise 12.00% simplify 26.92% simplify/trig/recurse 25.00% type/polynom 53.85% sin/normal 57.14% type/freeof 60.00% simplify/trig/evenodd 12.50% collect/recursive 8.70% tools/sign 19.05% limit 19.03% tools/map/function 37.50% forget:-forget_proc 51.85% trig/linear_in_Pi 50.00% limit/topright 14.08% limit/MrvRight/limsimp 57.14% type/suffixed 8.57% tools/map 3.64% signum 9.86% type/arctrig 66.67% combine/wrt 64.71% limit/left=right 7.14% simplify/do 16.81% series/trig 50.00% factor 3.53% @ 26.83% limit/mrv/compare0 16.67% collect 57.14%
t2≔CoveragePercentSelect⁡t1,percent=0.80,compare=`>`:
series/frontend 100.00% simplify/nosize 100.00% anames 100.00% type/taylor 100.00% simplify/size/length 100.00% type/nothing 100.00% tools/membertype 100.00% ListTools:-Reverse 100.00% type/simplify/+ 100.00% packages 100.00% type/simplify/* 100.00% limit/MrvRight 100.00% type/builtin 100.00% limit/mrv/compare 100.00% limit/mrv/MrvLeadTerm 100.00% limit/mrv/mrv 100.00% limit/IndetsRange 100.00% type/SymbolicInfinity 100.00% limit/ThawRange 100.00% type/laurent 100.00%
CoveragePercent⁡t1,depth=2
limit/mrv/LeadingExpon 0.00% simplify/evenodd 66.67% limit/dosubs 42.31% simplify/trig/multiply_and_choose 0.00% type/algnum 0.00% combine/cmbpwr 0.00% limit/easy 0.00% limit/MrvLimit 0.00% series/leadterm 8.99% depends:-Main 36.67% simplify/normal 38.46% series/frontend 100.00% `convert/list`:-ModuleApply 0.00% depends:-ModuleApply 57.14% trig/normal 3.12% limit/mrv/limsimpl 19.05% simplify/nosize 100.00% limit/MrvRight0 0.00% simplify/trig 5.45% limit/mrv/Testzero 3.57% anames 100.00% convert/sincos 0.00% ceil 10.26% combine 51.52% type/taylor 100.00% simplify/RootOf 0.00% PackageManagement:-pmember 0.00% simplify/size/length 100.00% tools/eval_foo/do 0.00% limit/mrv/EXP 0.00% type/arctrigh 0.00% limit/mrv/PreProcess0 46.67% limit/return 0.00% combine/power 3.57% type/nothing 100.00% limit/mrv/MrvLeadTerm0 0.40% simplify/evenodd/do 57.14% tools/membertype 100.00% forget:-do_unread 0.00% ListTools:-Reverse 0.00% simplify/normal/check 3.33% type/simplify/+ 0.00% forget:-ModuleApply 0.00% packages 0.00% series/sin 75.00% hasassumptions 0.00% tools/truncateSeries 23.81% type/simplify/* 0.00% expand/sin 0.00% type/point 0.00% limit/mrv/mrv0 8.82% limit/MrvLimit0 0.00% tools/eval_foo 4.55% expand/cos 0.00% limit/limit/piecewise 12.00% simplify 26.92% simplify/trig/recurse 0.00% limit/MrvRight 100.00% type/builtin 0.00% limit/mrv/compare 0.00% type/polynom 7.69% limit/mrv/MrvLeadTerm 100.00% sin/normal 57.14% limit/mrv/mrv 100.00% type/freeof 60.00% simplify/trig/evenodd 0.00% collect/recursive 8.70% tools/sign 19.05% limit 0.00% limit/IndetsRange 100.00% type/SymbolicInfinity 100.00% tools/map/function 0.00% forget:-forget_proc 0.00% trig/linear_in_Pi 50.00% limit/topright 14.08% limit/ThawRange 0.00% limit/MrvRight/limsimp 0.00% type/suffixed 0.00% tools/map 0.00% signum 9.86% type/arctrig 66.67% combine/wrt 64.71% limit/left=right 0.00% simplify/do 16.81% series/trig 45.45% factor 0.00% @ 2.44% limit/mrv/compare0 0.00% collect 57.14% type/laurent 100.00%
t2≔CoveragePercentSelect⁡t1,depth=2,percent=0.3:
CoveragePercent⁡t2,depth=2
limit/mrv/LeadingExpon 0.00% simplify/trig/multiply_and_choose 0.00% type/algnum 0.00% combine/cmbpwr 0.00% limit/easy 0.00% limit/MrvLimit 0.00% series/leadterm 8.99% `convert/list`:-ModuleApply 0.00% trig/normal 3.12% limit/mrv/limsimpl 19.05% limit/MrvRight0 0.00% simplify/trig 5.45% limit/mrv/Testzero 3.57% convert/sincos 0.00% ceil 10.26% simplify/RootOf 0.00% PackageManagement:-pmember 0.00% tools/eval_foo/do 0.00% limit/mrv/EXP 0.00% type/arctrigh 0.00% limit/return 0.00% combine/power 3.57% limit/mrv/MrvLeadTerm0 0.40% forget:-do_unread 0.00% ListTools:-Reverse 0.00% simplify/normal/check 3.33% type/simplify/+ 0.00% forget:-ModuleApply 0.00% packages 0.00% hasassumptions 0.00% tools/truncateSeries 23.81% type/simplify/* 0.00% expand/sin 0.00% type/point 0.00% limit/mrv/mrv0 8.82% limit/MrvLimit0 0.00% tools/eval_foo 4.55% expand/cos 0.00% limit/limit/piecewise 12.00% simplify 26.92% simplify/trig/recurse 0.00% type/builtin 0.00% limit/mrv/compare 0.00% type/polynom 7.69% simplify/trig/evenodd 0.00% collect/recursive 8.70% tools/sign 19.05% limit 0.00% tools/map/function 0.00% forget:-forget_proc 0.00% limit/topright 14.08% limit/ThawRange 0.00% limit/MrvRight/limsimp 0.00% type/suffixed 0.00% tools/map 0.00% signum 9.86% limit/left=right 0.00% simplify/do 16.81% factor 0.00% @ 2.44% limit/mrv/compare0 0.00%
t2≔CoveragePercentSelect⁡t1,depth=2,compare=`=`:
trig/linear_in_Pi 50.00%
t2≔CoveragePercentSelect⁡t1,depth=2,percent=0.80:
limit/mrv/LeadingExpon 0.00% simplify/evenodd 66.67% limit/dosubs 42.31% simplify/trig/multiply_and_choose 0.00% type/algnum 0.00% combine/cmbpwr 0.00% limit/easy 0.00% limit/MrvLimit 0.00% series/leadterm 8.99% depends:-Main 36.67% simplify/normal 38.46% `convert/list`:-ModuleApply 0.00% depends:-ModuleApply 57.14% trig/normal 3.12% limit/mrv/limsimpl 19.05% limit/MrvRight0 0.00% simplify/trig 5.45% limit/mrv/Testzero 3.57% convert/sincos 0.00% ceil 10.26% combine 51.52% simplify/RootOf 0.00% PackageManagement:-pmember 0.00% tools/eval_foo/do 0.00% limit/mrv/EXP 0.00% type/arctrigh 0.00% limit/mrv/PreProcess0 46.67% limit/return 0.00% combine/power 3.57% limit/mrv/MrvLeadTerm0 0.40% simplify/evenodd/do 57.14% forget:-do_unread 0.00% ListTools:-Reverse 0.00% simplify/normal/check 3.33% type/simplify/+ 0.00% forget:-ModuleApply 0.00% packages 0.00% series/sin 75.00% hasassumptions 0.00% tools/truncateSeries 23.81% type/simplify/* 0.00% expand/sin 0.00% type/point 0.00% limit/mrv/mrv0 8.82% limit/MrvLimit0 0.00% tools/eval_foo 4.55% expand/cos 0.00% limit/limit/piecewise 12.00% simplify 26.92% simplify/trig/recurse 0.00% type/builtin 0.00% limit/mrv/compare 0.00% type/polynom 7.69% sin/normal 57.14% type/freeof 60.00% simplify/trig/evenodd 0.00% collect/recursive 8.70% tools/sign 19.05% limit 0.00% tools/map/function 0.00% forget:-forget_proc 0.00% trig/linear_in_Pi 50.00% limit/topright 14.08% limit/ThawRange 0.00% limit/MrvRight/limsimp 0.00% type/suffixed 0.00% tools/map 0.00% signum 9.86% type/arctrig 66.67% combine/wrt 64.71% limit/left=right 0.00% simplify/do 16.81% series/trig 45.45% factor 0.00% @ 2.44% limit/mrv/compare0 0.00% collect 57.14%
See Also
CodeTools[Profiling]
CodeTools[Profiling][Build]
CodeTools[Profiling][GetProfileTable]
CodeTools[Profiling][Merge]
CodeTools[Profiling][Profile]
CodeTools[Profiling][UnProfile]
Download Help Document
What kind of issue would you like to report? (Optional)