North-Seattle-College / ad440-winter2021-thursday-repo

NSC AD 440 Winter 2021 Thursday cohort practicum repo
Apache License 2.0
2 stars 27 forks source link

Capture the time to load the /users/{user_id}/tasks 40 times #315

Closed natni closed 3 years ago

natni commented 3 years ago

Description Closes #310

This PR holds a script that captures the time to load the https://nscstrdevusw2thucommon.z5.web.core.windows.net/#/users/{user_id}/tasks URL 40 times with cache. Additionally, the script fixes the URL to use #-route and be loadable directly using Puppeteer

How to test

  1. Navigate to ui/react-ui from the root folder
  2. Download packages and dependencies needed using npm install
  3. Start the React app by typing npm start (check if the HashRoute works)
  4. When the app is successfully running on your localhost, please navigate to test/ui from the root folder
  5. Run the time-users-id-tasks.js file by typing time-users-id-tasks.js
  6. You should be able to see how long it took to perform each screenshot(after reloading) including the average time it took for the 40 screenshots. Image 3-24-21 at 8 18 PM
Below shows the time it took to load each page COUNT TIME(sec)
1 1.203
2 0.503
3 0.541
4 0.508
5 0.523
6 0.537
7 0.517
8 0.525
9 0.521
10 0.531
11 0.569
12 0.516
13 0.512
14 0.536
15 0.517
16 0.515
17 0.538
18 0.544
19 0.535
20 0.55
21 0.497
22 0.5
23 0.52
24 0.516
25 0.523
26 0.534
27 0.513
28 0.553
29 0.617
30 0.504
31 0.527
32 0.518
33 0.539
34 0.534
35 0.526
36 0.545
37 0.507
38 0.513
39 0.603
40 0.516

The average time to load is 0.55****

TIME SHEET

DATE ACTIVITY TIME
03/21 Research on HashRouting and implementation 2 hours
03/22 Writing a script to calculate the time to load the URL and capture time 2 hours
03/24 Final touch-ups and writing descriptions 2 hours