diff --git a/README.md b/README.md index f326a1b..d4c9d45 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,5 @@ The following code is needed in a .env. This is for the DB connection. > DB_PASS= This is based on the phish table. Table can also be changed if needed. + +Execution time is 1h24m16.934194673s. This was for 18811 records. diff --git a/dbupdate.go b/dbupdate.go index 0da340c..6f9c112 100644 --- a/dbupdate.go +++ b/dbupdate.go @@ -38,7 +38,7 @@ func main() { StartTime := time.Now() // Format the start time - formattedStartTime := StartTime.Format("10-01-2023 10:22:10") + formattedStartTime := StartTime.Format("02-01-2006 15:04:05") fmt.Println("Script started at " + formattedStartTime) // Perform a cleanup on DB @@ -103,6 +103,10 @@ func main() { } defer resp.Body.Close() + currentTime := time.Now() + formattedTime := currentTime.Format("02-01-2006 15:04:05") + fmt.Println(formattedTime + ": Initial database table setup done") + fmt.Println("Status code: ", resp.StatusCode) body, err := ioutil.ReadAll(resp.Body) if err != nil { @@ -138,14 +142,14 @@ func main() { EndTime := time.Now() // Format the end time - formattedEndTime := EndTime.Format("10-01-2023 10:22:50") + formattedEndTime := EndTime.Format("02-01-2006 15:04:05") fmt.Println("Recent changes recieved and has been added to the database. Removed domains deleted from database. Reorded domains.") fmt.Println("Script ended at " + formattedEndTime) // Calculate the time difference - diff := formattedEndTime.sub(formattedStartTime) + diff := EndTime.Sub(StartTime) // Print the time difference fmt.Println("Time until completion: ", diff) diff --git a/domain-db-updater b/domain-db-updater index 3d4e6a1..c963c2c 100755 Binary files a/domain-db-updater and b/domain-db-updater differ