Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
CodeTools[Usage]
使い方
CodeTools[Usage](expression, options)
CodeTools[CPUTime](expression)
CodeTools[RealTime](expression)
モデルの説明
コマンド Usage は、expression の評価用の時間およびメモリ使用統計を記録します。
デフォルトでは、使用統計が印刷され、expression の評価結果が返されます。
オプション output=value を与えることで、value が realtime、cputime、bytesused、bytesalloc または output のいずれかである統計のひとつを返すか、または、複数の出力や出力のリストを指定することができます。複数の出力は指定された順番で返されます。expression の評価からの出力が式列の場合、出力の途中で表示される場合は、リストとして返されます。
メモリはバイト単位で、時間は秒単位で返されます。
output は、すべての統計を含む記録を返す all になることもあります。その場合、デフォルトでは統計は印刷されません。
オプション quiet=truefalse を与えることで、統計を印刷しないようにする(または、output=all のとき強制的に印刷するようにする)ことができます。
CPUTime(expression) は Usage(expression, output=[cputime,output], quiet)を呼び出します。
RealTime(expression) は Usage(expression, output=[realtime,output], quiet)を呼び出します。
アプリケーションと例題
with(CodeTools):
Usage(ifactor(32!+1));
memory used=10.11MiB, alloc change=8.12MiB, cpu time=0.17s, real time=0.18s
Usage(ifactor(33!+1),output='bytesused');
memory used=11.56MiB, alloc change=9.50MiB, cpu time=0.19s, real time=0.19s
Usage(ifactor(36!+1),output='all');
data:=Usage(ifactor(39!+1),output='all', quiet=false);
memory used=62.10MiB, alloc change=51.62MiB, cpu time=1.16s, real time=1.20s
data[bytesused];
Usage(ifactor(40!+1),output=['cputime','bytesused']);
memory used=4.68MiB, alloc change=3.37MiB, cpu time=0.11s, real time=0.12s
Usage(ifactor(42!+1),output=['cputime','bytesused'],quiet);
with(LinearAlgebra):
Usage(LUDecomposition(RandomMatrix(25)),output='all');
Usage(LUDecomposition(RandomMatrix(35)),output=['cputime','output']);
memory used=8.46MiB, alloc change=0 bytes, cpu time=0.12s, real time=0.12s
Usage(LUDecomposition(RandomMatrix(45)),output=['cputime','output','bytesused']);
memory used=20.16MiB, alloc change=0 bytes, cpu time=0.28s, real time=0.28s
CPUTime(ifactor(45!+1));
RealTime(ifactor(46!+1));
関連項目
kernelopts, time
Download Help Document