I used this in my last projects... 

var result : Number = 0;
for(var i : Number = 0; i < 3; i++) {
        var t : Number = getTimer();
        while(getTimer() - t < 50) {
                var r : Number = random(10);
                mc._x = r;
                mc._y = r;
                mc._xscale = r;
        mc._yscale = r;
                mc._alpha= r;
        result++;

        }

} 

Works for me. Of course you need a mc on stage. Result is the performance. But 
with this test you only get the performance of the system. We set up a little 
benchmark on http://bench.powerflasher.de/ maybee you find some usefull stuff 
there.

regards
Lars Heinrich

Powerflasher GmbH
Tel: +49 (0)241 91880-230
-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Alias
Gesendet: Montag, 31. Oktober 2005 14:46
An: Flashcoders mailing list
Betreff: [Flashcoders] Profiling the clients CPU

Hi guys,

I'm working on a project which involves reducing the amount of work done, based 
on the client's CPU speed.

I'm wondering - does anyone have a tried & tested method of doing this? I'm 
thinking something along the lines of:


startTime = getTimer();

//do something timeconsuming - loop 100 times, for example speed = 
doSomethingTimeconsuming()

if (speed < 5){

doSomethingEasy();

} else{

doSomethingHard();

}


What I'm wondering is the doing something timeconsuming part - I need a simple 
operation that will be reasonably consistent across player types - is there any 
operation that *hasn't* been improved or that has always been fast? The target 
player is FP6 (pre 6.65), so I need an operation that will be consistently slow 
or fast on every player since then

Has anyone done this much?


Thanks in advance,
Alias
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to