Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting Diagnostic Data from Task Manager
#3
Code:
Copy      Help
;;Declare Variables
int i
int c = 500;;how many times?
int waitBetweenCommands = 0

File f.Open("$my qm$\BabyControlCenterTesting4.csv" "a")
fprintf f "BEGINNING NEW MACRO[]"
fprintf f "iteration#,AllBabies->BC,BC->Program,Program->Reports,Reports->AllBabies,totaltime[]"

long beginTime
long time1
long time2
long time3
long endTime

long alltobc
long bctoprogram
long programtoreports
long reportstoall
long iterationDuration

for i 0 c
,fprintf f "%i," i
,beginTime=perf
,
,;;select all babies
,wait 0 S "babyXAll.bmp" 0 0 0x1
,lef
,wait waitBetweenCommands
,
,;;look at birth certificates
,wait 0 S "babyBirthCertificates.bmp" 0 0 0x1
,lef
,wait waitBetweenCommands    
,
,;;go back
,wait 0 S "babyBack.bmp" 0 0 0x1
,;;Log time it took to get to birth certificate screen
,time1=perf
,alltobc = time1-beginTime
,fprintf f "%i," alltobc
,lef
,wait waitBetweenCommands
,,
,;;unselect all babies
,wait 0 S "babyXAll2.bmp" 0 0 0x1
,lef
,wait waitBetweenCommands
,
,;;select the (probably)first baby
,wait 0 S "babyCheckMark.bmp" 0 0 0x1
,lef
,wait waitBetweenCommands
,
,;;program baby
,wait 0 S "babyProgram.bmp" 0 0 0x1
,lef
,wait waitBetweenCommands
,
,;;done button
,wait 0 S "babyDone.bmp" 0 0 0x1
,;;Log time it took to get to birth certificate screen
,time2=perf
,bctoprogram = time2-time1
,fprintf f "%i," bctoprogram
,lef
,wait waitBetweenCommands

,;;view baby reports
,wait 0 S "babyReports.bmp" 0 0 0x1
,lef
,wait waitBetweenCommands
,
,;;yes we want to lose baby information
,wait 0 S "babyYesButton.bmp" 0 0 0x1
,;;Log time it took to get to birth certificate screen
,time3=perf
,programtoreports = time3-time2
,fprintf f "%i," programtoreports
,lef
,wait waitBetweenCommands
,
,;;go to All Babies Screen
,wait 0 S "babyAll.bmp" 0 0 0x1
,lef
,wait waitBetweenCommands
,
,;;unselect all babies
,wait 0 S "babyXAll2.bmp" 0 0 0x1
,lef
,wait waitBetweenCommands
,
,;;move pointer to top corner of screen, so we can
,;;select all the babies again in the next iteration.
,mou 1 1
,
,;;log the time, print to console.
,endTime=perf
,reportstoall = endTime-time3
,iterationDuration = endTime-beginTime
,out "iteration:%i time(microseconds): %i" i iterationDuration
,fprintf f "%i," reportstoall
,fprintf f "%i[]" iterationDuration
,
,

,
,
,




This is my macro. You can see that I'm logging the time it takes me to get between the various screens in the software, but yeah that diagnostic stuff would be more useful. I'll give that a try. Thanks.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)