Main Forum > General Computer Support

Several Computer Problems[Solved]

<< < (4/4)

dondon:
In Games its often reffered as actions per minute.My program is a batch and its code is such.The fixed time one is to improve speed.Performance or APM starts at 0 and continuasly adds 1 for a minute  (when A (a static defined time)NEQ B(changing defined time)).That s varriable is a 1 time  switch to define the minimum value registered as the first value of the APM .At the end will store the value within a text file APM.txt.The graphs i posted contain data within them.At 5000 APM a computer should be crawling,in case of my dual core procesor.You can leave it running all day but due to the speed of calculation,this small batch will take up to 40%.I calculates pretty fast and with this method I also detect offline lags.Mainly the only repeated code in defining the APM is this:

:TimeB
title %Performance%
set /a performance=%performance%+1
set B=%time:~3,2%
if %A% EQU %B% goto TimeB

4 lines so almost nothing



the CODE

@echo off

mode con:cols=30 lines=10

:Variables
set Max=0
set s=0

:FixTime
cls
echo Waiting time 00 (%time:~6,2%)

if %time:~6,2% EQU 00 cls
if %time:~6,2% EQU 00 goto TimeA

set c=%time:~6,2%
:time
set d=%time:~6,2%

if %c% EQU %d% goto time

goto FixTime

:TimeA

set Performance=0

set A=%time:~3,2%

:TimeB

title %Performance%

set /a performance=%performance%+1

set B=%time:~3,2%

if %A% EQU %B% goto TimeB


set /a s=%s%+1

if %s% EQU 1 set Min=%Performance%
if %s% EQU 1 echo %date% %time% >> APM.txt

cls

if %Performance% GTR %Max% set Max=%Performance%
if %Performance% LSS %Min% set Min=%Performance%

echo %Performance% >> "APM.txt"

echo Performance
echo ----------------------------
echo Curent  Value : %Performance%
echo Minimum Value : %Min%
echo Maximum Value : %Max%
echo.
goto TimeA


End of CODE

Boggin:
I won't try to pretend I understand that :) but in your last post you mentioned at 16 APM the machine started to freeze, yet at the other end (5000) you had a similar effect.

Don't get too technical if you want to explain that :D - I'm just a simple lad at heart :)

dondon:
simple ,envision the speed of those

18000- Ferrari
5000 - Turtle
16-Little to None

Boggin:
Got that :)

Navigation

[0] Message Index

[*] Previous page

Go to full version