()
| 216 | } |
| 217 | |
| 218 | async function singleRequest() { |
| 219 | const totalStartMS = Date.now(); |
| 220 | let startMS; |
| 221 | |
| 222 | startMS = Date.now(); |
| 223 | const courseInstanceUrl = await getCourseInstanceUrl(); |
| 224 | const timeHomepage = (Date.now() - startMS) / 1000; |
| 225 | |
| 226 | startMS = Date.now(); |
| 227 | const questionUrl = await getQuestionUrl(courseInstanceUrl); |
| 228 | const timeQuestions = (Date.now() - startMS) / 1000; |
| 229 | |
| 230 | startMS = Date.now(); |
| 231 | const questionSubmitInfo = await getQuestionSubmitInfo(questionUrl); |
| 232 | const timeQuestion = (Date.now() - startMS) / 1000; |
| 233 | |
| 234 | startMS = Date.now(); |
| 235 | await postQuestionAnswer(questionSubmitInfo); |
| 236 | const timeSubmit = (Date.now() - startMS) / 1000; |
| 237 | |
| 238 | const timeTotal = (Date.now() - totalStartMS) / 1000; |
| 239 | |
| 240 | return {timeHomepage, timeQuestions, timeQuestion, timeSubmit, timeTotal}; |
| 241 | } |
| 242 | |
| 243 | async function singleClientTest(iterations, iClient, clients) { |
| 244 | let results = { |
no test coverage detected