Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
The profile Function
Calling Sequence
profile(procedure1, procedure2, ...)
Parameters
procedure1, procedure2, ...
-
any number of valid Maple procedures that have not already been profiled with profile
Description
The procedure profile alters the given procedures to record runtime information on the procedures. If profile is successful, it returns NULL on exit.
The profiling information is printed using the showprofile() function as shown in the examples below. For more options and examples see ?showprofile. To stop collecting profiling information on a function, use unprofile(). To reset the profiler to begin a new profile use resetprofile().
Use of profile() increases memory usage and slows down computations, sometimes dramatically. In addition, profile may not work properly with procedures that have special evaluation rules.
A closely related function, exprofile(), can be used to profile all Maple functions at once.
Examples
fib:=proc(n) option remember; if n<2 then n else fib(n-1)+fib(n-2) end if; end proc:
function depth calls time time% bytes bytes% --------------------------------------------------------------------------- fib 5 9 0.000 0.00 6168 100.00 --------------------------------------------------------------------------- total: 5 9 0.000 0.00 6168 100.00
function depth calls time time% bytes bytes% --------------------------------------------------------------------------- gcd 1 1 0.011 91.67 552280 84.89 randpoly 1 3 0.001 8.33 74504 11.45 expand 1 8 0.000 0.00 6160 0.95 divide 1 6 0.000 0.00 17656 2.71 --------------------------------------------------------------------------- total: 4 18 0.012 100.00 650600 100.00
function depth calls time time% bytes bytes% --------------------------------------------------------------------------- gcd 1 1 0.005 71.43 253256 69.59 divide 1 6 0.002 28.57 110656 30.41 content 0 0 0.000 0.00 0 0.00 --------------------------------------------------------------------------- total: 2 7 0.007 100.00 363912 100.00
See Also
exprofile, kernelopts, showprofile, unprofile
Download Help Document