JPS58225456A - Measuring system of execution time - Google Patents

Measuring system of execution time

Info

Publication number
JPS58225456A
JPS58225456A JP57108456A JP10845682A JPS58225456A JP S58225456 A JPS58225456 A JP S58225456A JP 57108456 A JP57108456 A JP 57108456A JP 10845682 A JP10845682 A JP 10845682A JP S58225456 A JPS58225456 A JP S58225456A
Authority
JP
Japan
Prior art keywords
program
execution
execution time
command
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP57108456A
Other languages
Japanese (ja)
Inventor
Hiroyuki Yokogawa
裕幸 横川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP57108456A priority Critical patent/JPS58225456A/en
Publication of JPS58225456A publication Critical patent/JPS58225456A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Measurement Of Unknown Time Intervals (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To facilitate easy measurement of execution time for a program block, by indicating the start and end of execution for an optional program block designated within a program. CONSTITUTION:A command which is previously defined in an electronic computer system is set to a start comnand register 1 and a stop command register 2, respectively. These commands are also supplied to a terminal of each of comparator 3 and 4. The commands which are successively executed are supplied to an execution command register 5 when a prescribed program is executed then to the other terminal of the comparators 3 and 4, respectively. The comparators 3 and 4 compare the contents fed to their both terminals with each other and feed the output to a timer 6 to start or stop the timer 6.

Description

【発明の詳細な説明】 この発明は電子計算機システムにおいて、所定プログラ
ムを実行する際の実行時間を計測する実行時間測定方式
に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to an execution time measuring method for measuring the execution time when executing a predetermined program in an electronic computer system.

従来の電子計算機システムでは、ユーザーがシステムを
利用した時間からレンタル料を算出するためにプログツ
ム全体の実行時間を計測することが行われている。また
従来から、タイマ割込み処理を用いて所定時間を計測す
るプログラムを作成することも一般に行われている。
In conventional computer systems, the execution time of the entire program is measured in order to calculate the rental fee based on the time the user uses the system. Furthermore, it has been common practice to create a program that measures a predetermined time using timer interrupt processing.

一方、プログラムの開発時においては常にその処理スピ
ードが速いプログラムの開発が要求されている。したが
っていくつかのプログラム例を作成しておいて、各プロ
グラムの所定の実行部分、例えばどのサブルーチンやル
ープを実行した方が得策かを知りたい場合があり、した
がってそのために上記サブルーチン、ループなどの実行
時間を計測したい場合があるか、上述した従来のプログ
ツム全体の実行時間の計測や、またタイマ割込み処理で
はこのようなサブルーチンなどの実行時間の計測は行え
ず、勿論、従来にはサブルーチンなどの実行時間を直接
計測することは行われていない。従って、命令の実行時
間とステップ数からプログラムの実行時間を!を算しな
ければならなかったO この発明は以上説明した事情を背景になされたもので、
その目的とするところは、所定プログツム内の任意のプ
ログラムブロックの実行時間の計測が容易且つ簡単に行
えるようにした実行時間測定方式を提供することである
On the other hand, when developing programs, there is always a demand for developing programs with high processing speed. Therefore, you may want to create several program examples and find out which subroutines or loops are better to execute for a given execution part of each program. Is there a case where you want to measure time? It is not possible to measure the execution time of the entire program as described above, or to measure the execution time of such a subroutine using timer interrupt processing. There is no direct measurement of time. Therefore, the program execution time is calculated from the instruction execution time and the number of steps! This invention was made against the background of the circumstances explained above.
The purpose is to provide an execution time measurement method that allows easy and simple measurement of the execution time of any program block within a predetermined program.

以下、図面を参照してこの発明の一実施例を説明する。Hereinafter, one embodiment of the present invention will be described with reference to the drawings.

第1図は要部の回路図である。図において、スタートコ
マンドレジスタ1、ストップコマンドレジスタ2には夫
々、例えばこの電子計算機システムにおいて予め定義さ
れているコマンド「TIMIII  EITARTJ、
「T工M’l  5TOPJがキーボードからのキー人
力操作によって入力設定される。而して上記コマンド[
TIMEI  S’l’ARTJ、j’l’IIK  
8TOPJは夫々、所定プログラム内の任意のエリア(
プログラムブロック)の実行開始、実行停止(終了)を
指定するコマンドである。そしてスタートコマンドレジ
スタ11ストツプコマンドレジスタ2に夫々設定されて
いるコマンド「TIME  5TAl’lTJ、「Tニ
ーME  5TOPJは夫々、比較回路3または比較回
路4の各一端に入力する。
FIG. 1 is a circuit diagram of the main part. In the figure, a start command register 1 and a stop command register 2 each contain, for example, a command "TIMIII EITARTJ," which is predefined in this computer system.
"T Engineering M'l 5TOPJ is input and set by manual key operation from the keyboard. Then, the above command [
TIMEI S'l'ARTJ,j'l'IIK
Each of the 8 TOPJs is an arbitrary area within a predetermined program (
This command specifies the start and stop (end) of execution (program block). The commands "TIME 5TAL'lTJ" and "Tnee ME 5TOPJ set in the start command register 11 and the stop command register 2, respectively, are inputted to one end of the comparison circuit 3 or the comparison circuit 4, respectively.

他方、実行コマンドレジスタ5には上述した所定プログ
ラムの実行時に1成案行されるコマンドが入力し、次い
で比較回路3.4の各他端に入力する・猶、上記所定プ
ログラムにおいて実行時間を計測したいプログラムブロ
ックの先頭と末尾にはコマンド「TIMEI  5TA
RTJまたはコマンY [TIMIII  SI’OP
Jが予め組込まれている。
On the other hand, the execution command register 5 is input with a command that is executed once when the above-mentioned predetermined program is executed, and then inputted to each other end of the comparison circuit 3. The command “TIMEI 5TA” is placed at the beginning and end of the program block.
RTJ or Command Y [TIMIII SI'OP
J is pre-installed.

比較回路3.4は夫々、両入力端に入力している各コマ
ンドの内容を比較し、一致していれば2値論理レベルの
“I″′、一致していなければ“0“の一致信号を夫々
出力し、タイマ6の端子5TARTまたは端子S”l”
OFへ与える。タイマ6は4子19TARTk:“1″
の一致信号が入力してから次に端子5TOPに“11の
一致信号が入力するまでの間、所定周波数で出力される
。電子計算機システム内の内部クロックを計数し、上記
実行時間を計測する。そして計測した実行時間は印字装
置、表示装置に送って印字、表示出力させる・次に12
図を参照して動作を説明する・例えばいま、第2図に示
すようにあるプログラム内の行番号roo100Jから
rl 9000Jまでの間のプログラムブロックの実行
時間を計測してそれを印字、表示させるものとする。し
たがって上記プログラムの作成時に、行番号r0010
0Jには[TIME  5TAI(TJの文を書き、次
いで次の行番号から行番号rl 9000Jまでの間に
実行時間を計測するプログラムの各文を書き、更に行番
号「19000Jでは文「TIMEI  8TopJを
書き、更にまた次の行番号r19100Jには文「TI
ME  PR工NTJと書いておく。
Comparison circuits 3 and 4 respectively compare the contents of each command input to both input terminals, and if they match, a binary logic level "I"' is generated, and if they do not match, a match signal of "0" is generated. are output to terminal 5TART or terminal S"l" of timer 6.
Give to OF. Timer 6 has 4 children 19 TARTk: “1”
It is output at a predetermined frequency from the time when the match signal of "11" is input to the terminal 5TOP.The internal clock in the computer system is counted to measure the execution time. Then, the measured execution time is sent to the printing device and display device for printing and display output.Next 12
Explain the operation with reference to diagrams.For example, as shown in Figure 2, the execution time of a program block between line numbers roo100J and rl9000J in a certain program is measured and printed and displayed. shall be. Therefore, when creating the above program, line number r0010
In 0J, write the statement [TIME 5TAI (TJ), then write each statement of the program that measures the execution time from the next line number to line number rl 9000J, and then at line number 19000J write the statement ``TIMEI 8TopJ''. Then, on the next line number r19100J, the sentence “TI
Write ME PR Engineering NTJ.

次いでキーボードから予め定給されているコマンドーエ
ME 5TAR’1′JN 「TIMIII Sτop
Jを夫々入力し1スタートコマンドレジスタ1、ストッ
プコマンドレジスタ2に夫々セットする。したがって比
較回路3.4の各一端には夫々、コマンド「T工MIS
TARTJまたはコマンド「TIMEI  S’l”O
P」が入力する。次に上記プログラムをランさせると、
そのプログラムの実行に伴って実行コマンドレジスタ5
には順次、若い行番号からの実行コマンドが入力する。
Next, from the keyboard, select the commando ME 5TAR'1'JN "TIMIII Sτop
J is input and set in 1 start command register 1 and stop command register 2, respectively. Therefore, each end of the comparator circuit 3.4 is connected to the command "T-MIS".
TARTJ or command “TIMEI S’l”O
P” is input. Next, when you run the above program,
Execution command register 5
Execution commands are input sequentially starting from the lowest line number.

このため比較回路3.4の各他端に仁この実行コマンド
が順次入力するが、行は含まれないので、行番号r00
100Jが実行開始されるまでは比較回路3.4は共に
“0“の一致信号を出力し、タイマ6の端子5TART
Therefore, Jinko's execution commands are sequentially input to each other end of the comparison circuit 3.4, but since the line is not included, the line number r00
Until the execution of 100J starts, the comparison circuits 3 and 4 both output a match signal of "0", and the terminal 5TART of the timer 6
.

端子5TOPに与えている。したがってこの間タイマ6
は内部りpツクを計数せず、実行時間の計測を行わない
It is applied to terminal 5TOP. Therefore, during this time, timer 6
does not count internal processes and does not measure execution time.

次に行番号ro 0100Jが実行開始されるとその文
中のコマンド[TIMEI  5TARTJが実行コマ
ンドレジスタ5に入力し、次いで比較回路3.4の各他
端に入力する。このため比較回路3はl”の、また比較
回路4は“0“の各一致信号を出力し、タイマ6に与え
る。このためタイマ6は内部りpツタの計数動作を開始
し、実行時間の計測を開始する。そして次に行番号「1
9000」が実行開始されるまでの間のプログラムブロ
ック内にはコマンド[TIMff  8TARTJは勿
論、コマンド[TIME  5TOIIJは含まれてい
ず、したがってこの間、タイマ6は計測を続行する。
Next, when line number ro 0100J starts to be executed, the command [TIMEI 5TARTJ in that sentence is input to the execution command register 5, and then input to each other end of the comparison circuit 3.4. Therefore, the comparator circuit 3 outputs a match signal of "1", and the comparator circuit 4 outputs a match signal of "0", and provides it to the timer 6. Therefore, the timer 6 starts counting the internal ripples, and the execution time is Start measurement.Next, line number “1”
The program block until "9000" starts execution does not include the command [TIME 5TOIIJ, let alone the command [TIMff 8TARTJ], so the timer 6 continues to measure during this time.

次に行番号r19000Jが実行開始されるとその文中
のコマンド「T工ax  5rop」!>(実行コマン
ドレジスタ5に入力し、次いで比較回路3.4の各他端
に入力する。このため比較回路3゜4は夫々II OI
Iまたは“1″の一致信号を出力してタイマ6に与える
ので、その時点でタイ!6の計測動作は使止する・ 次に行番号「19100Jが実行開始されるとタイマ6
により計測された上記プログラムブロックの実行時間が
印字装置、表示装置に送出されて 4゜印字、表示され
る。即ち、実行時間を目で確認できるものである。
Next, when line number r19000J starts executing, the command in that sentence is "T-ax 5rop"! >(Input to the execution command register 5, and then input to each other end of the comparison circuits 3.4. Therefore, the comparison circuits 3.4 are inputted to the II OI, respectively.
A match signal of I or "1" is output and given to timer 6, so at that point it is tied! 6 measurement operation is discontinued. Next, when line number ``19100J'' starts execution, timer 6
The execution time of the program block measured by 4 degrees is sent to a printing device and a display device, where it is printed and displayed. In other words, the execution time can be visually confirmed.

猶、上記実施例ではコマンド「TIME  8TART
J、「TIME  5TOFJを予め定義されているも
のとしたが1オペレータが任意に定義するようにしても
よい。例えばFOR文→NIDXT文、1工Lll  
0PIIIN−+’F;ILE  0LO8Bの各文の
コマンドを上記コマンド「TIMl18TARTJ、「
TIME  5TOPJに替えて任意に定義し、上記の
各大間の実行時間を計測するようにしてもよい。
However, in the above example, the command “TIME 8TART
J, "TIME 5TOFJ is assumed to be defined in advance, but one operator may define it arbitrarily. For example, FOR statement → NIDXT statement, 1st Lll
0PIIIN-+'F;ILE 0LO8B commands are changed to the above commands "TIMl18TARTJ,"
TIME 5 TOPJ may be replaced with an arbitrary definition to measure the execution time of each interval.

この発明は以上説明したように、所定プログラム内の任
意のプログラムブロックの実行時間を計測する奥行時間
測定方式を提供したから、従来行えなかったプログラム
の任意のエリアの実行時間が簡単に、且つ精度よく行え
、このため複数のプログラム例の中から処理時間の最短
のものを探索することが容易となって実用上、極めて便
利になるものである。
As explained above, the present invention provides a depth time measurement method for measuring the execution time of any program block within a predetermined program, so that the execution time of any area of a program that could not be done in the past can be easily and accurately measured. This makes it easy to search for the program with the shortest processing time among a plurality of program examples, making it extremely convenient in practice.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はこの発明の要部の回路図、第2図はプログラム
例を示す図である。 1・・・・・・スタートコマンドレジスタ、2・・・・
・・ストップコマンドレジスタ、3.4・・・・・・比
較回路、5・・・…実行コマンドレジスタ、6・・・・
・・タイマ。
FIG. 1 is a circuit diagram of the main part of the present invention, and FIG. 2 is a diagram showing an example of a program. 1... Start command register, 2...
... Stop command register, 3.4 ... Comparison circuit, 5 ... Execution command register, 6 ...
...Timer.

Claims (1)

【特許請求の範囲】[Claims] 電子計算機システムのプログラムの実行時間を計測する
計測手段と、上記プログラム内の指定された任意のプロ
グラムブロックが実行開始および実行終了するに伴って
上記計測手段に対し計測動作の実行開始および実行終了
を指示する指示手段とを有し、上記プログラムブロック
の実行時間の計測が行えるようにしたことを特徴とする
実行時間測定方式。
A measuring means for measuring the execution time of a program of an electronic computer system, and instructing the measuring means to start and end execution of a measurement operation as a designated arbitrary program block in the program starts and ends execution. 1. An execution time measuring method, comprising: an instruction means for instructing, and capable of measuring the execution time of the program block.
JP57108456A 1982-06-25 1982-06-25 Measuring system of execution time Pending JPS58225456A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57108456A JPS58225456A (en) 1982-06-25 1982-06-25 Measuring system of execution time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57108456A JPS58225456A (en) 1982-06-25 1982-06-25 Measuring system of execution time

Publications (1)

Publication Number Publication Date
JPS58225456A true JPS58225456A (en) 1983-12-27

Family

ID=14485227

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57108456A Pending JPS58225456A (en) 1982-06-25 1982-06-25 Measuring system of execution time

Country Status (1)

Country Link
JP (1) JPS58225456A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62216050A (en) * 1986-02-20 1987-09-22 Fujitsu Ltd Measurement processing system for executing cpu time for program unit
JPS63299966A (en) * 1987-05-30 1988-12-07 Tohoku Ricoh Co Ltd Printer

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62216050A (en) * 1986-02-20 1987-09-22 Fujitsu Ltd Measurement processing system for executing cpu time for program unit
JPS63299966A (en) * 1987-05-30 1988-12-07 Tohoku Ricoh Co Ltd Printer

Similar Documents

Publication Publication Date Title
JP4935619B2 (en) Digital signal processor
JPH06195147A (en) Clock contrller
JPS58225456A (en) Measuring system of execution time
US3999169A (en) Real time control for digital computer utilizing real time clock resident in the central processor
US3226684A (en) Computer control apparatus
GB2197569A (en) Logic circuit diagram processing apparatus and method
JPH08139575A (en) Pulse output circuit
JPS61267858A (en) Microcomputer
CA1173164A (en) Fraction calculator
JPS59146342A (en) Loop control system
SU786009A2 (en) Controlled frequency divider
SU926684A1 (en) Device for simulating multi-dimensional diffusion processes
SU980284A1 (en) Switching device
JPH0343830A (en) Block repeating circuit
JPS58222359A (en) Processing time measuring device
JPS5494380A (en) Counter using microprocessor
SU746540A1 (en) Device for computing logarithms of numbers
SU1003315A1 (en) Device for control of pulse repetition period
SU868758A1 (en) Device for control of digital computer stop
SU561966A1 (en) Computing system for processing numbers and multidimensional vectors
SU957233A1 (en) Device for simulating simplest random event flow
JPS55153063A (en) Electronic equipment
SU798728A1 (en) Multicoordinate linear speed controller
JPS60209853A (en) Measuring device of program execution time
JPS55103645A (en) Microprogram control system