diff --git a/docs/postman/performance/NBA-Statistics-Go-performance-report-15.html b/docs/postman/performance/NBA-Statistics-Go-performance-report-15.html new file mode 100644 index 0000000..0873e15 --- /dev/null +++ b/docs/postman/performance/NBA-Statistics-Go-performance-report-15.html @@ -0,0 +1,1122 @@ + + + + Performance test report - 1f0daf04-fc14-4dc0-9155-2bf370cc976d : 15 + + + + + + + + + + + + + + + + + + + +
+
+
+
+

+ - + + (#15) +

+
+ +
+
+
+ Postman collection: + NBA Statistics Go +
+
+ Report exported on: + +
+
+
+ +
+

Test setup

+
+
+
+
Virtual users
+
45 VU
+
+
+ Duration + + 10 minutes + +
+
+
+
+
Start time
+
+
+
+
End time
+
+
+
+
+
+
Load profile
+
Ramp up (4 minutes 50 seconds)
+
+
+
Environment
+
-
+
+
+
+
+

1. Summary

+ +
+
+ + 50,826 +
+
+ + 83.78 requests/second +
+
+ + + 276 ms + +
+
+ + + 0.00 % + +
+
+ +
+

1.1 Response time

+ Response time trends during the test duration. +
+
+ +
+
+ + +
+

1.2 Throughput

+ Rate of requests sent per second during the test duration. +
+
+ +
+
+ + +
+
+

1.3 Requests with slowest response times

+ Top 5 slowest requests based on their average response times. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RequestResp. time (Avg ms)90th (ms)95th (ms)99th (ms)Min (ms)Max (ms)
+
+ GET + Games Detail +
+ +
https://api.server.nbaapi.com/api/games?isPlayoff=false&page=1&pageSize=3&sortBy=date&ascending=false&include=lineScores%2C%20playerGameBasicStats
+
5331,2151,4892,637579,117
+
+ GET + Games +
+ +
https://api.server.nbaapi.com/api/games?isPlayoff=false&page=1&pageSize=3&sortBy=date&ascending=false
+
3988771,1061,919498,940
+
+ GET + Player Totals Stats +
+ +
{{base_url}}/api/playertotals?season=2026&team=HOU&page=1&pageSize=12&isPlayoff=False
+
2696688551,535488,321
+
+ GET + Player Totals Stats +
+ +
{{base_url}}/api/playertotals?season=2026&team=HOU&page=1&pageSize=20&isPlayoff=False
+
2686758501,285488,278
+
+ GET + Player Totals Playoffs Stats +
+ +
{{base_url}}/api/playertotals?team=HOU&page=1&pageSize=10&sortBy=assists&isPlayoff=true&season=2019
+
2666438561,429488,715
+
+ + + +
+
+

2. Metrics for each request

+ The requests are shown in the order they were sent by virtual users. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RequestTotal requestsRequests/sMin (ms)Avg (ms)90th (ms)Max (ms)Error %
+
+ GET + Games +
+
https://api.server.nbaapi.com/api/games?isPlayoff=false&page=1&pageSize=3&sortBy=date&ascending=false
+
4,2497.00493988778,9400
+
+ GET + Games Copy +
+
https://api.server.nbaapi.com/api/games?isPlayoff=true&page=1&pageSize=15&sortBy=date&ascending=true
+
4,2487.00441975188,1190
+
+ GET + Games Detail +
+
https://api.server.nbaapi.com/api/games?isPlayoff=false&page=1&pageSize=3&sortBy=date&ascending=false&include=lineScores%2C%20playerGameBasicStats
+
4,2426.99575331,2159,1170
+
+ GET + Player Totals Stats +
+
{{base_url}}/api/playertotals?season=2026&team=HOU&page=1&pageSize=12&isPlayoff=False
+
4,2406.99482696688,3210
+
+ GET + Player Totals Playoffs Stats +
+
{{base_url}}/api/playertotals?team=HOU&page=1&pageSize=10&sortBy=assists&isPlayoff=true&season=2019
+
4,2396.99482666438,7150
+
+ GET + Player Advanced Stats +
+
{{base_url}}/api/playeradvancedstats?season=2026&team=HOU&page=1&pageSize=4&ascending=false&isPlayoff=false
+
4,2386.99462606692,7420
+
+ GET + Player Advanced Stats Copy +
+
{{base_url}}/api/playeradvancedstats?season=2025&team=HOU&page=1&pageSize=3&ascending=false&isPlayoff=true
+
4,2346.98472636708,4920
+
+ GET + Player Advanced Playoff Stats +
+
{{base_url}}/api/playeradvancedstats?season=2025&team=BOS&page=1&pageSize=4&sortBy=winShares&ascending=false&isPlayoff=true
+
4,2336.98482486443,4540
+
+ GET + Shot Chart +
+
{{base_url}}/api/playershotchart?page=1&playerId=duranke01&date=Dec%2017%2C2018
+
4,2326.98451884778,4000
+
+ GET + Shot Chart 2 +
+
{{base_url}}/api/playershotchart?page=1&playerId={{shot_player}}&season=2018&result=true&shot_type=3-pointer
+
4,2286.97441554153,3010
+
+ GET + Player Advanced Stats +
+
{{base_url}}/api/playeradvancedstats?season=2025&team=NYK&page=1&pageSize=4&sortBy=vorp&ascending=false&isPlayoff=true
+
4,2226.96472616488,5370
+
+ GET + Player Totals Stats +
+
{{base_url}}/api/playertotals?season=2026&team=HOU&page=1&pageSize=20&isPlayoff=False
+
4,2216.96482686758,2780
+
+ +
+

3. Errors

+
+

This run has no errors

+ All requests were sent successfully and returned a 2xx response code. +
+
+ +
+
+ +
+
+

Testing API performance on Postman

+
+ Postman enables you to simulate user traffic and observe how your API behaves under load. It also helps you identify any issues or bottlenecks that affect performance. +
+ Learn more about + + testing API performance. + +
+
+ + + + +
+ + diff --git a/docs/postman/performance/restore_dump_remote.md b/docs/postman/performance/restore_dump_remote.md new file mode 100644 index 0000000..00139b4 Binary files /dev/null and b/docs/postman/performance/restore_dump_remote.md differ diff --git a/import.go b/import.go index 9007ab2..63c19a2 100644 --- a/import.go +++ b/import.go @@ -64,7 +64,7 @@ func importGameSchedules(db *gorm.DB) { months := []string{ // "september", "october", "november", "december", "january", // "february", "march", "april", "may", "june", - "december", + "january", "february", // "february", "march", "april", "may", "june", // "october", "november", "december", } @@ -91,9 +91,9 @@ func importGameSchedules(db *gorm.DB) { func importBoxScores(db *gorm.DB) { // now := time.Now() - from := time.Date(2025, time.December, 12, 0, 0, 0, 0, time.UTC) + from := time.Date(2026, time.January, 27, 0, 0, 0, 0, time.UTC) // from := time.Date(now.Year(), now.Month(), now.Day()-1, 5, 30, 0, 0, time.UTC) - to := time.Date(2025, time.December, 31, 5, 30, 0, 0, time.UTC) + to := time.Date(2026, time.February, 28, 5, 30, 0, 0, time.UTC) dateRangeComment := fmt.Sprintf("--- Starting Box Score Data Import for games between %s and %s ---", from.Format("January 2, 2006"), @@ -126,28 +126,28 @@ func importPlayerShotCharts(db *gorm.DB) { // Nikola Jokić: "jokicni01" // Luka Dončić: "doncilu01" targetPlayerIDs := []string{ - // "jamesle01", - // "curryst01", - // "jokicni01", - // "doncilu01", - // "hardeja01", - // "irvinky01", - // "duranke01", - // "youngtr01", + "jamesle01", + "curryst01", + "jokicni01", + "doncilu01", + "hardeja01", + "irvinky01", + "duranke01", + "youngtr01", // "lillada01", - // "gilgesh01", - // "brunsja01", - // "edwaran01", + "gilgesh01", + "brunsja01", + "edwaran01", // "mitchdo01", // "bookede01", - // "derozde01", + "derozde01", // "aldrila01", - // "westbru01", + "westbru01", // "paulch01", - // "butleji01", + "butleji01", "davisan02", "leonaka01", - "youngtr01", + // "youngtr01", "tatumja01", // Add more player IDs here as needed