inprove reporting???!?!!!!!.
This commit is contained in:
@@ -83,7 +83,7 @@ func InsertOrUpdateEstimatedCall(ctx context.Context, db *sql.DB, values []inter
|
||||
}
|
||||
return id, action, nil
|
||||
} else {
|
||||
fmt.Printf("MATCH!!! Original Hash: %s, Retrieved Hash: %s\n", hashString, retrievedHash)
|
||||
return 0, "no update", nil
|
||||
//fmt.Printf("MATCH!!! Original Hash: %s, Retrieved Hash: %s\n", hashString, retrievedHash)
|
||||
return 0, "none", nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ func DBData(data *data.Data) {
|
||||
fmt.Println("SID:", sid)
|
||||
|
||||
// counters
|
||||
var insertCount, updateCount, totalCount, estimatedCallInsertCount, estimatedCallUpdateCount, recordedCallInsertCount, recordedCallUpdateCount int
|
||||
var insertCount, updateCount, totalCount, estimatedCallInsertCount, estimatedCallUpdateCount, estimatedCallNoneCount, recordedCallInsertCount, recordedCallUpdateCount int
|
||||
|
||||
for _, journey := range data.ServiceDelivery.EstimatedTimetableDelivery[0].EstimatedJourneyVersionFrame.EstimatedVehicleJourney {
|
||||
var values []interface{}
|
||||
@@ -169,12 +169,13 @@ func DBData(data *data.Data) {
|
||||
//fmt.Printf("Inserts: %d, Updates: %d, Total: %d\n", insertCount, updateCount, totalCount)
|
||||
if totalCount%1000 == 0 {
|
||||
fmt.Printf(
|
||||
"Inserts: %d, Updates: %d, Total: %d; estimatedCalls = I: %d U: %d; recordedCalls = I: %d U: %d\n",
|
||||
"Inserts: %d, Updates: %d, Total: %d; estimatedCalls = I: %d U: %d N: %d; recordedCalls = I: %d U: %d\n",
|
||||
insertCount,
|
||||
updateCount,
|
||||
totalCount,
|
||||
estimatedCallInsertCount,
|
||||
estimatedCallUpdateCount,
|
||||
estimatedCallNoneCount,
|
||||
recordedCallInsertCount,
|
||||
recordedCallUpdateCount,
|
||||
)
|
||||
@@ -313,6 +314,8 @@ func DBData(data *data.Data) {
|
||||
estimatedCallInsertCount++
|
||||
} else if action == "update" {
|
||||
estimatedCallUpdateCount++
|
||||
} else if action == "none" {
|
||||
estimatedCallNoneCount++
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -397,12 +400,13 @@ func DBData(data *data.Data) {
|
||||
|
||||
}
|
||||
fmt.Printf(
|
||||
"DONE: Inserts: %d, Updates: %d, Total: %d; estimatedCalls = I: %d U: %d; recordedCalls = I: %d U: %d\n",
|
||||
"DONE: Inserts: %d, Updates: %d, Total: %d; estimatedCalls = I: %d U: %d N: %d; recordedCalls = I: %d U: %d\n",
|
||||
insertCount,
|
||||
updateCount,
|
||||
totalCount,
|
||||
estimatedCallInsertCount,
|
||||
estimatedCallUpdateCount,
|
||||
estimatedCallNoneCount,
|
||||
recordedCallInsertCount,
|
||||
recordedCallUpdateCount,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user