A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Concept: AS-based CPU Speed Checker ??

  1. #1
    Qwaizang:syntax_entity_ Q__Hybrid's Avatar
    Join Date
    Aug 2005
    Posts
    270

    Concept: AS-based CPU Speed Checker ??

    Among other projects, I'm trying to come up with clever ways of developing scripts that determine the performance capabilities of the end user's local machine.

    I would like to develop a script that uses a memory-intensive task to determine how much RAM a computer has, at least in terms of whether or not it possesses enough to carry out memory-intensive tasks without bogging down. Basically a stress utility.

    I'm scripting in MX '04 Pro, but I don't know what sort of tasks I would need to throw at a system to get the proper result. Any suggestions, alternatives?

    +Q__

  2. #2
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625
    I don't know about any clean way of gathering this information. And I wouldn't use Flash to benchmark a computer, because if it can't handle it, the whole thing will freeze, and users won't be happy.

    Though it's easy to rughly tell the cpu capabilities: just make a loop, test it on a few computers to find out what figures (how much time it takes to complete the loop) different processors produce, and create your own metering system.

    Code:
    var st:Number = getTimer();
    var x:String = '';
    for(var i=0;i<1000;i++) {
         x += 'x';
    }
    x = '';
    delete x;
    var et:Number = getTimer();
    var lap:Number = et - st; // this value should give you timelap in microseconds;
    Hope this helps,
    Ascanio
    Altruism does not exist. Sustainability must be made profitable.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center