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
|
return id, action, nil
|
||||||
} else {
|
} else {
|
||||||
fmt.Printf("MATCH!!! Original Hash: %s, Retrieved Hash: %s\n", hashString, retrievedHash)
|
//fmt.Printf("MATCH!!! Original Hash: %s, Retrieved Hash: %s\n", hashString, retrievedHash)
|
||||||
return 0, "no update", nil
|
return 0, "none", nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ func DBData(data *data.Data) {
|
|||||||
fmt.Println("SID:", sid)
|
fmt.Println("SID:", sid)
|
||||||
|
|
||||||
// counters
|
// 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 {
|
for _, journey := range data.ServiceDelivery.EstimatedTimetableDelivery[0].EstimatedJourneyVersionFrame.EstimatedVehicleJourney {
|
||||||
var values []interface{}
|
var values []interface{}
|
||||||
@@ -169,12 +169,13 @@ func DBData(data *data.Data) {
|
|||||||
//fmt.Printf("Inserts: %d, Updates: %d, Total: %d\n", insertCount, updateCount, totalCount)
|
//fmt.Printf("Inserts: %d, Updates: %d, Total: %d\n", insertCount, updateCount, totalCount)
|
||||||
if totalCount%1000 == 0 {
|
if totalCount%1000 == 0 {
|
||||||
fmt.Printf(
|
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,
|
insertCount,
|
||||||
updateCount,
|
updateCount,
|
||||||
totalCount,
|
totalCount,
|
||||||
estimatedCallInsertCount,
|
estimatedCallInsertCount,
|
||||||
estimatedCallUpdateCount,
|
estimatedCallUpdateCount,
|
||||||
|
estimatedCallNoneCount,
|
||||||
recordedCallInsertCount,
|
recordedCallInsertCount,
|
||||||
recordedCallUpdateCount,
|
recordedCallUpdateCount,
|
||||||
)
|
)
|
||||||
@@ -313,6 +314,8 @@ func DBData(data *data.Data) {
|
|||||||
estimatedCallInsertCount++
|
estimatedCallInsertCount++
|
||||||
} else if action == "update" {
|
} else if action == "update" {
|
||||||
estimatedCallUpdateCount++
|
estimatedCallUpdateCount++
|
||||||
|
} else if action == "none" {
|
||||||
|
estimatedCallNoneCount++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -397,12 +400,13 @@ func DBData(data *data.Data) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
fmt.Printf(
|
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,
|
insertCount,
|
||||||
updateCount,
|
updateCount,
|
||||||
totalCount,
|
totalCount,
|
||||||
estimatedCallInsertCount,
|
estimatedCallInsertCount,
|
||||||
estimatedCallUpdateCount,
|
estimatedCallUpdateCount,
|
||||||
|
estimatedCallNoneCount,
|
||||||
recordedCallInsertCount,
|
recordedCallInsertCount,
|
||||||
recordedCallUpdateCount,
|
recordedCallUpdateCount,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user