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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham 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 Path: g2news2.google.com!news4.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.68.MISMATCH!feeder.news-service.com!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!gegeweb.org!feeder.news.orange.fr!not-for-mail Date: Thu, 30 Dec 2010 00:00:10 +0100 From: h_poincare User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Task execution time test References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <4d1bbd6e$0$7701$ba4acef3@reader.news.orange.fr> Organization: les newsgroups par Orange NNTP-Posting-Date: 29 Dec 2010 23:59:59 CET NNTP-Posting-Host: 90.20.47.175 X-Trace: 1293663599 reader.news.orange.fr 7701 90.20.47.175:15259 X-Complaints-To: abuse@orange.fr Xref: g2news2.google.com comp.lang.ada:17211 Date: 2010-12-29T23:59:59+01:00 List-Id: Le 26/12/2010 11:25, Dmitry A. Kazakov a �crit : > Here is a small test for task execution time. > > Five worker tasks are used to generate background CPU load. When the > measured task enters delay 0.1ms (on a system where delay is non-busy) it > should lose the CPU prematurely. > > Under at least some Windows systems the test might fail because Windows > performance counters are CPU quants 1ms or 10ms, depending on settings. > > On my Windows XP SP3 the test yields 0-0. > 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 am just curious to know how to get/set Windows performance counters ----------------------------------------------- Regards Fran�ois FABIEN