Watts-Lab / deliberation-empirica

Empirica V2 framework
MIT License
5 stars 0 forks source link

If there is no countdown, postflight report is incorrect for other timings #809

Open JamesPHoughton opened 1 month ago

JamesPHoughton commented 1 month ago

In the postflight report, the timings for the various components are not computing properly - not sure if this is in every case, or just in cases where there is no countdown.

 "timings": {
    "intro": {
      "max": 2700006.423,
      "min": 115.347,
      "mean": 450187.9560829878,
      "median": 254.016
    },
    "countdown": {
      "max": null,
      "min": null,
      "mean": null
    },
    "lobby": {
      "max": null,
      "min": null,
      "mean": null,
      "median": null
    },
    "game": {
      "max": null,
      "min": null,
      "mean": null,
      "median": null
    },
    "exit": {
      "max": null,
      "min": null,
      "mean": null,
      "median": null
    }
  },

Need to adjust this code: https://github.com/Watts-Lab/deliberation-empirica/blob/main/server/src/postFlight/postFlightReport.js#L160-L228 to make it more robust. Not sure why the error is, so its possible we need to fix where the times are saved during the game. (?)