Help for this page

Select Code to Download


  1. or download this
    # CPU consumption loop
    
    ...
    $t = 0;   # sec of think time between iterations (0)
    
    for (1..$p) {fork()} while (1) {for($x=0;$x<$w*100000;$x++){sin($x/($x
    ++2))} if($t){sleep($t)}}
    
  2. or download this
    # Memory consumption loop - defaults consume 1GB in 3 min on i7-620m
    
    ...
      for($x=0;$x<$i;$x++){$z[$y,$x]="$rs"x(int(rand($x))*2)}
      $y++;$rs='';sleep($t);if($y==$r){@z='';$y=0;sleep($c)}
    }