From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,cae92f92d6a1d4b1 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder2.cambriumusenet.nl!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!news.wiretrip.org!news2.arglkargh.de!news.ett.com.ua!not-for-mail From: anon@att.net Newsgroups: comp.lang.ada Subject: Re: Ada.Execution_Time Date: Wed, 22 Dec 2010 14:30:47 +0000 (UTC) Organization: ETT newsserver Message-ID: References: <4d05e737$0$6980$9b4e6d93@newsspool4.arcor-online.net> Reply-To: anon@anon.org NNTP-Posting-Host: dialup-4.225.169.253.dial1.dallas1.level3.net X-Complaints-To: usenet@news.ett.com.ua X-Notice: Filtered by postfilter v. 0.6.1 X-Newsreader: IBM NewsReader/2 2.0 Xref: g2news2.google.com comp.lang.ada:17077 Date: 2010-12-22T14:30:47+00:00 List-Id: In , BrianG writes: >anon@att.net wrote: >> In , BrianG writes: >>> anon@att.net wrote: >>>> In , BrianG writes: >>>>> Georg Bauhaus wrote: >>>>>> On 12/12/10 10:59 PM, BrianG wrote: >>> .... >> >> Kind of funny you cutting down "TOP" which can be found on most Linux >> boxes Which allow anyone with the CPU options turn on to see both the >> Real_Time and CPU_Time. >Please provide any comment I made for/against "top". Since my original >question was based on Windows and I've stated that my (current) Linux >doesn't support this package, that seems unlikely (even if I didn't >trust my memory). >> >.... >> Note: Not sure of the name for the Windows version of Linux's top. >There is (that I know of) no real equiv to "top" - as in a command-line >program. The equiv to GNOME's "System Monitor" (for example - a gui >program) would be Task Manager (and I made no comment about that either). >> >.... >> >> How to you think these or any other web hosting company could measure the >> complete system resources without measuring the CPU Execution Time on a >> given user or application! In Ada, the routines can now use the package >> called "Ada.CPU_Execution_Time". >> >I have no problem with what Execution_Time does (as evidenced by the >fact that I asked a question about its use) - it measures exactly what I >want, an estimate of the CPU time used by a task. My problem is with >the way it is defined - it provides, by itself, no "value" of that that >a using program can make use of to print or calculate (i.e. you also >need Real_Time for that, which is silly - and I disagree that that is >necessarily required in any case - my program didn't need it otherwise). >> >--BrianG There has been many third party versions of this package over the years and most of them included a Linux version. The Windows is specific to GNAT. And it just like GNAT the Windows version is not complete either. For Execution_Time there are three package. GNAT has Ada.Execution_Time for both Linux-MaRTE and Windows Ada.Execution_Time.Timers only for Linux-MaRTE Ada.Execution_Time.Group_Budgets Unimplemented Yet In using the Linux-MaRTE version ( 2 packages ) Ada.Execution_Time Ada.Execution_Time.Timers Of course in this example you could use ( Note: they are fully implemented ) Ada.Real_Time Ada.Real_Time.Timing_Events An algorithm comparison program might look like: with Ada.Execution_Time ; with Ada.Execution_Time.Timers ; procedure Compare_Algorithm is task type Algorithm_1 is use Ada.Execution_Time.Timers ; begin begin Set_Handler ( ... ) ; -- start timer Algorithm_1 ; Time_Remaining ( ... ) ; -- sample timer end ; Cancel_Handler ( ... ) ; release timer end ; task type Algorithm_2 is use Ada.Execution_Time.Timers ; begin begin Set_Handler ( ... ) ; -- start timer Algorithm_2 ; Time_Remaining ( ... ) ; -- sample timer end ; Cancel_Handler ( ... ) ; release timer end ; use Ada.Execution_Time ; begin -- Start tasks -- wait until all tasks finish -- compare times using Execution_Time -- Print summary of comparison end ;