CodeTools[Profiling][Coverage] - Maple Programming Help

Home : Support : Online Help : Programming : Profiling : CodeTools[Profiling] : Coverage : CodeTools/Profiling/Coverage/PercentSelect

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.
 • 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}[\mathrm{Profiling}]\right):$
 > $\mathrm{t1}≔\mathrm{Build}\left(\mathrm{commands}='∫{ⅇ}^{x}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆx'\right):$
 > $\mathrm{Coverage}[\mathrm{Percent}]\left(\mathrm{t1}\right)$
 TypeTools:-known 100.00% SolveTools:-Linear 27.78% DEtools/DRNF:-IsHyperexponential 32.00% DEtools/DRNF:-Gosper 70.59% IntegrationTools:-Indefinite:-Main 32.14% factor 8.33% int:-Exact 62.16% DEtools/DRNF:-GosperStep3 62.50% DEtools/DRNF:-PolynomialNormalForm 57.69% IntegrationTools:-Indefinite:-CleanUp 33.33% type/radalgfun 7.69% isolve 37.14% PackageManagement:-pmember 11.76% type/suffixed 37.14% SolveTools:-CancelInverses 31.58% anames 100.00% evala 4.98% Cache:-AddTemporary 66.67% int/hyperexp 66.67% int:-ModuleApply 37.50% SolveTools:-LinearSolvers:-RationalSparse:-RationalSparse 8.33% int:-IntSubstitutions 75.00% type/builtin 100.00% unprotect 100.00% index/FillInitVals 29.41% type/SymbolicInfinity 100.00% int:-Init 100.00% Cache:-ModuleLoad 75.00% int/tools/rename 20.00% int:-EnvToOptions 80.00% tools/get_names 100.00% forget:-ModuleApply 44.00% forget:-forget_proc 55.56% ListTools:-Reverse 100.00% SolveTools:-LinearSolvers:-RationalSparse:-iprimpart 100.00% diff/exp 100.00% collect/recursive 13.64% resultant 11.11% SolveTools:-ModuleLoad 100.00% SolveTools:-ProcessArguments 75.00% tools/gensym 66.67% packages 100.00% IntegrationTools:-Initialize 100.00% DEtools/DRNF:-MinimalLinearSpecialization 43.75% protect 100.00% type/arctrig 66.67% collect 57.14% IntegrationTools:-Indefinite:-ModuleApply 75.00% TypeTools:-forgetAll 100.00% tools/df_dt 52.38% gcd 21.28% resultant/univar 20.69% forget:-do_unread 66.67% gcd/doit 11.93% type/realcons 38.46% SolveTools:-Engine:-OnLoad 100.00% SolveTools:-LinearSolvers:-RationalSparse:-ModuleApply 100.00% SolveTools:-LinearSolvers:-Rational 80.00% SolveTools:-LinearSolvers:-RationalSparse:-MBMSparseSolve 67.65% TypeTools:-AddType 88.89%
 > $\mathrm{t2}≔\mathrm{Coverage}[\mathrm{PercentSelect}]\left(\mathrm{t1},'\mathrm{percent}'=0.3\right):$
 > $\mathrm{Coverage}[\mathrm{Percent}]\left(\mathrm{t2}\right)$
 SolveTools:-Linear 27.78% factor 8.33% type/radalgfun 7.69% PackageManagement:-pmember 11.76% evala 4.98% SolveTools:-LinearSolvers:-RationalSparse:-RationalSparse 8.33% index/FillInitVals 29.41% int/tools/rename 20.00% collect/recursive 13.64% resultant 11.11% gcd 21.28% resultant/univar 20.69% gcd/doit 11.93%
 > $\mathrm{t2}≔\mathrm{Coverage}[\mathrm{PercentSelect}]\left(\mathrm{t1}\right):$
 > $\mathrm{Coverage}[\mathrm{Percent}]\left(\mathrm{t2}\right)$
 SolveTools:-Linear 27.78% DEtools/DRNF:-IsHyperexponential 32.00% IntegrationTools:-Indefinite:-Main 32.14% factor 8.33% IntegrationTools:-Indefinite:-CleanUp 33.33% type/radalgfun 7.69% isolve 37.14% PackageManagement:-pmember 11.76% type/suffixed 37.14% SolveTools:-CancelInverses 31.58% evala 4.98% int:-ModuleApply 37.50% SolveTools:-LinearSolvers:-RationalSparse:-RationalSparse 8.33% index/FillInitVals 29.41% int/tools/rename 20.00% forget:-ModuleApply 44.00% collect/recursive 13.64% resultant 11.11% DEtools/DRNF:-MinimalLinearSpecialization 43.75% gcd 21.28% resultant/univar 20.69% gcd/doit 11.93% type/realcons 38.46%
 > $\mathrm{t2}≔\mathrm{Coverage}[\mathrm{PercentSelect}]\left(\mathrm{t1},'\mathrm{percent}'=0.80\right):$
 > $\mathrm{Coverage}[\mathrm{Percent}]\left(\mathrm{t2}\right)$
 SolveTools:-Linear 27.78% DEtools/DRNF:-IsHyperexponential 32.00% DEtools/DRNF:-Gosper 70.59% IntegrationTools:-Indefinite:-Main 32.14% factor 8.33% int:-Exact 62.16% DEtools/DRNF:-GosperStep3 62.50% DEtools/DRNF:-PolynomialNormalForm 57.69% IntegrationTools:-Indefinite:-CleanUp 33.33% type/radalgfun 7.69% isolve 37.14% PackageManagement:-pmember 11.76% type/suffixed 37.14% SolveTools:-CancelInverses 31.58% evala 4.98% Cache:-AddTemporary 66.67% int/hyperexp 66.67% int:-ModuleApply 37.50% SolveTools:-LinearSolvers:-RationalSparse:-RationalSparse 8.33% int:-IntSubstitutions 75.00% index/FillInitVals 29.41% Cache:-ModuleLoad 75.00% int/tools/rename 20.00% int:-EnvToOptions 80.00% forget:-ModuleApply 44.00% forget:-forget_proc 55.56% collect/recursive 13.64% resultant 11.11% SolveTools:-ProcessArguments 75.00% tools/gensym 66.67% DEtools/DRNF:-MinimalLinearSpecialization 43.75% type/arctrig 66.67% collect 57.14% IntegrationTools:-Indefinite:-ModuleApply 75.00% tools/df_dt 52.38% gcd 21.28% resultant/univar 20.69% forget:-do_unread 66.67% gcd/doit 11.93% type/realcons 38.46% SolveTools:-LinearSolvers:-Rational 80.00% SolveTools:-LinearSolvers:-RationalSparse:-MBMSparseSolve 67.65%
 > $\mathrm{t2}≔\mathrm{Coverage}[\mathrm{PercentSelect}]\left(\mathrm{t1},'\mathrm{percent}'=0.80,'\mathrm{compare}'=\mathrm{>}\right):$
 > $\mathrm{Coverage}[\mathrm{Percent}]\left(\mathrm{t2}\right)$
 TypeTools:-known 100.00% anames 100.00% type/builtin 100.00% unprotect 100.00% type/SymbolicInfinity 100.00% int:-Init 100.00% tools/get_names 100.00% ListTools:-Reverse 100.00% SolveTools:-LinearSolvers:-RationalSparse:-iprimpart 100.00% diff/exp 100.00% SolveTools:-ModuleLoad 100.00% packages 100.00% IntegrationTools:-Initialize 100.00% protect 100.00% TypeTools:-forgetAll 100.00% SolveTools:-Engine:-OnLoad 100.00% SolveTools:-LinearSolvers:-RationalSparse:-ModuleApply 100.00% TypeTools:-AddType 88.89%
 > $\mathrm{Coverage}[\mathrm{Percent}]\left(\mathrm{t1},'\mathrm{depth}'=2\right)$
 TypeTools:-known 100.00% SolveTools:-Linear 0.00% DEtools/DRNF:-IsHyperexponential 28.00% DEtools/DRNF:-Gosper 0.00% IntegrationTools:-Indefinite:-Main 0.00% factor 8.33% int:-Exact 2.70% DEtools/DRNF:-GosperStep3 0.00% DEtools/DRNF:-PolynomialNormalForm 0.00% IntegrationTools:-Indefinite:-CleanUp 0.00% type/radalgfun 0.00% isolve 0.00% PackageManagement:-pmember 0.00% type/suffixed 25.71% SolveTools:-CancelInverses 31.58% anames 100.00% evala 2.99% Cache:-AddTemporary 0.00% int/hyperexp 0.00% int:-ModuleApply 0.00% SolveTools:-LinearSolvers:-RationalSparse:-RationalSparse 0.00% int:-IntSubstitutions 0.00% type/builtin 0.00% unprotect 100.00% index/FillInitVals 5.88% type/SymbolicInfinity 100.00% int:-Init 0.00% Cache:-ModuleLoad 0.00% int/tools/rename 0.00% int:-EnvToOptions 10.00% tools/get_names 0.00% forget:-ModuleApply 0.00% forget:-forget_proc 0.00% ListTools:-Reverse 0.00% SolveTools:-LinearSolvers:-RationalSparse:-iprimpart 0.00% diff/exp 0.00% collect/recursive 9.09% resultant 0.00% SolveTools:-ModuleLoad 0.00% SolveTools:-ProcessArguments 0.00% tools/gensym 66.67% packages 0.00% IntegrationTools:-Initialize 0.00% DEtools/DRNF:-MinimalLinearSpecialization 0.00% protect 100.00% type/arctrig 66.67% collect 57.14% IntegrationTools:-Indefinite:-ModuleApply 0.00% TypeTools:-forgetAll 100.00% tools/df_dt 0.00% gcd 0.00% resultant/univar 0.00% forget:-do_unread 0.00% gcd/doit 0.00% type/realcons 30.77% SolveTools:-Engine:-OnLoad 0.00% SolveTools:-LinearSolvers:-RationalSparse:-ModuleApply 0.00% SolveTools:-LinearSolvers:-Rational 0.00% SolveTools:-LinearSolvers:-RationalSparse:-MBMSparseSolve 0.00% TypeTools:-AddType 88.89%
 > $\mathrm{t2}≔\mathrm{Coverage}[\mathrm{PercentSelect}]\left(\mathrm{t1},'\mathrm{depth}'=2,'\mathrm{percent}'=0.3\right):$
 > $\mathrm{Coverage}[\mathrm{Percent}]\left(\mathrm{t2},'\mathrm{depth}'=2\right)$
 SolveTools:-Linear 0.00% DEtools/DRNF:-IsHyperexponential 28.00% DEtools/DRNF:-Gosper 0.00% IntegrationTools:-Indefinite:-Main 0.00% factor 8.33% int:-Exact 2.70% DEtools/DRNF:-GosperStep3 0.00% DEtools/DRNF:-PolynomialNormalForm 0.00% IntegrationTools:-Indefinite:-CleanUp 0.00% type/radalgfun 0.00% isolve 0.00% PackageManagement:-pmember 0.00% type/suffixed 25.71% evala 2.99% Cache:-AddTemporary 0.00% int/hyperexp 0.00% int:-ModuleApply 0.00% SolveTools:-LinearSolvers:-RationalSparse:-RationalSparse 0.00% int:-IntSubstitutions 0.00% type/builtin 0.00% index/FillInitVals 5.88% int:-Init 0.00% Cache:-ModuleLoad 0.00% int/tools/rename 0.00% int:-EnvToOptions 10.00% tools/get_names 0.00% forget:-ModuleApply 0.00% forget:-forget_proc 0.00% ListTools:-Reverse 0.00% SolveTools:-LinearSolvers:-RationalSparse:-iprimpart 0.00% diff/exp 0.00% collect/recursive 9.09% resultant 0.00% SolveTools:-ModuleLoad 0.00% SolveTools:-ProcessArguments 0.00% packages 0.00% IntegrationTools:-Initialize 0.00% DEtools/DRNF:-MinimalLinearSpecialization 0.00% IntegrationTools:-Indefinite:-ModuleApply 0.00% tools/df_dt 0.00% gcd 0.00% resultant/univar 0.00% forget:-do_unread 0.00% gcd/doit 0.00% SolveTools:-Engine:-OnLoad 0.00% SolveTools:-LinearSolvers:-RationalSparse:-ModuleApply 0.00% SolveTools:-LinearSolvers:-Rational 0.00% SolveTools:-LinearSolvers:-RationalSparse:-MBMSparseSolve 0.00%
 > $\mathrm{t2}≔\mathrm{Coverage}[\mathrm{PercentSelect}]\left(\mathrm{t1},'\mathrm{depth}'=2,'\mathrm{compare}'=\mathrm{=}\right):$
 > $\mathrm{Coverage}[\mathrm{Percent}]\left(\mathrm{t2},'\mathrm{depth}'=2\right)$
 > $\mathrm{t2}≔\mathrm{Coverage}[\mathrm{PercentSelect}]\left(\mathrm{t1},'\mathrm{depth}'=2,'\mathrm{percent}'=0.80\right):$
 > $\mathrm{Coverage}[\mathrm{Percent}]\left(\mathrm{t2},'\mathrm{depth}'=2\right)$
 SolveTools:-Linear 0.00% DEtools/DRNF:-IsHyperexponential 28.00% DEtools/DRNF:-Gosper 0.00% IntegrationTools:-Indefinite:-Main 0.00% factor 8.33% int:-Exact 2.70% DEtools/DRNF:-GosperStep3 0.00% DEtools/DRNF:-PolynomialNormalForm 0.00% IntegrationTools:-Indefinite:-CleanUp 0.00% type/radalgfun 0.00% isolve 0.00% PackageManagement:-pmember 0.00% type/suffixed 25.71% SolveTools:-CancelInverses 31.58% evala 2.99% Cache:-AddTemporary 0.00% int/hyperexp 0.00% int:-ModuleApply 0.00% SolveTools:-LinearSolvers:-RationalSparse:-RationalSparse 0.00% int:-IntSubstitutions 0.00% type/builtin 0.00% index/FillInitVals 5.88% int:-Init 0.00% Cache:-ModuleLoad 0.00% int/tools/rename 0.00% int:-EnvToOptions 10.00% tools/get_names 0.00% forget:-ModuleApply 0.00% forget:-forget_proc 0.00% ListTools:-Reverse 0.00% SolveTools:-LinearSolvers:-RationalSparse:-iprimpart 0.00% diff/exp 0.00% collect/recursive 9.09% resultant 0.00% SolveTools:-ModuleLoad 0.00% SolveTools:-ProcessArguments 0.00% tools/gensym 66.67% packages 0.00% IntegrationTools:-Initialize 0.00% DEtools/DRNF:-MinimalLinearSpecialization 0.00% type/arctrig 66.67% collect 57.14% IntegrationTools:-Indefinite:-ModuleApply 0.00% tools/df_dt 0.00% gcd 0.00% resultant/univar 0.00% forget:-do_unread 0.00% gcd/doit 0.00% type/realcons 30.77% SolveTools:-Engine:-OnLoad 0.00% SolveTools:-LinearSolvers:-RationalSparse:-ModuleApply 0.00% SolveTools:-LinearSolvers:-Rational 0.00% SolveTools:-LinearSolvers:-RationalSparse:-MBMSparseSolve 0.00%