0

Task:

I have a column of frames (1, 2, 3,...) and a column of time elapsed (33.835, 59.944, 85.267,...)ms.

I would like to count the number of frames every second, i.e. average FPS.

 

Attempt (vague pseudo code):

Start at cell B2, move down a cell to B3 and calculate the difference in time elapsed (B3-B2), if it isn't 1000ms move down to the next cell, B4, and calculate difference in "time elapsed" (B4-B2) and so on.

Once the difference in time elapsed is 1000ms, the difference in frames between the starting cell B2 and ending cell, say B39, is calculated (A39-A2) and output in an adjacent column.

 

Problems:

The difference in time elapsed will rarely be one second (1000ms) exactly so the formula would need to determine which cell gives the closest value to 1000ms, say cell B38 or B39.

The formula needs to perform this again starting from the last cell, i.e. now we start from B39 and do the same again.

I don't know how to code this

  • Could you show us what you've tried so far, please? – Paul Oct 24 '17 at 14:25
  • 1
    For average FPS you could simply just count the total amount of frames and divide by the total amount of seconds between the first frame and the last. Or did you need a more granular analysis of frame rates? – nbayly Oct 24 '17 at 14:39
  • I want a more granular analysis. As it is I could produce a plot of instantaneous FPS against time, but this is too granular. Average FPS seems useful in this case. I haven't tried anything yet, I know what I want the formula to do but I don't know if it's even feasible let alone how to do it, I'm terrible with coding. Here is a link to some sample data: https://docs.google.com/spreadsheets/d/1Nn6EaxpgMCEve0tCpmFnENPYmIMcU-g5tZnw81XqEvA/edit?usp=sharing – TekWarfare Oct 24 '17 at 19:00

0 Answers0