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, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,ef7281a41a574423 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.78.MISMATCH!feeder.news-service.com!news.netcologne.de!newsfeed-fusi2.netcologne.de!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Task execution time test Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4d1bbd6e$0$7701$ba4acef3@reader.news.orange.fr> Date: Thu, 30 Dec 2010 09:54:47 +0100 Message-ID: <1msa4k5ed4kcg.586dr1u71qpq.dlg@40tude.net> NNTP-Posting-Date: 30 Dec 2010 09:54:46 CET NNTP-Posting-Host: f6da10dc.newsspool3.arcor-online.net X-Trace: DXC=Rnh[3ZWI[LTPU8j_I0DN6_McF=Q^Z^V3X4Fo<]lROoRQ8kF On Thu, 30 Dec 2010 00:00:10 +0100, h_poincare wrote: > Here are the measures of the code on my Windows machines > which tend to prove that the scheduling is correct. > > On Windows Vista SP2 : > For 1_000 loops > Seconds 0 Fraction 0.093600600 > For 10_000 loops > Seconds 1 Fraction 0.029606600 > > On Windows XP2002 SP3 : > For 1_000 loops > Seconds 0 Fraction 0.125000000 > Seconds 0 Fraction 0.109375000 > For 10_000 loops > Seconds 1 Fraction 0.140625000 > > GPS 4.4.1 (20091215) hosted on i686-pc-mingw32 > GNAT GPL 2010 (20100603) I think you have a multi-core processor. In effect the measured task does not lose the processor as the test intends. Make sure that the number of worker task is sufficiently high to make busy all cores. (I have posted a better test in a new thread.) > I am just curious to know how to get/set Windows performance counters QueryPerformanceCounter returns a 64-bit integer. QueryPerformanceFrequency gives the frequency of the counter. Relation of both may serve a replacement for Ada.Real_Time.Clock. Beware multi-cores. Each core has its own counter. That means, you cannot mix counts from different cores. SetThreadAffinityMask can be used to glue the task to a core. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de