Update result listing
This commit is contained in:
parent
ca505dfff3
commit
b727aba854
|
@ -42,15 +42,15 @@ func init() {
|
||||||
}
|
}
|
||||||
for idx, result := range incompleteResults {
|
for idx, result := range incompleteResults {
|
||||||
output.ResultItem(output.ResultItemData{
|
output.ResultItem(output.ResultItemData{
|
||||||
ID: result.ID,
|
ID: result.Result.ID,
|
||||||
Index: idx,
|
Index: idx,
|
||||||
TotalCount: len(incompleteResults),
|
TotalCount: len(incompleteResults),
|
||||||
Name: result.TestGroupName,
|
Name: result.TestGroupName,
|
||||||
StartTime: result.StartTime,
|
StartTime: result.StartTime,
|
||||||
NetworkName: "FIXME", //result.NetworkName,
|
NetworkName: result.Network.NetworkName,
|
||||||
Country: "FIXME", //result.Country,
|
Country: result.Network.CountryCode,
|
||||||
ASN: "FIXME", //result.ASN,
|
ASN: fmt.Sprintf("AS%d", result.Network.ASN),
|
||||||
Summary: "{}", //result.Summary,
|
Summary: "{}", //result.Summary,
|
||||||
Done: result.IsDone,
|
Done: result.IsDone,
|
||||||
DataUsageUp: result.DataUsageUp,
|
DataUsageUp: result.DataUsageUp,
|
||||||
DataUsageDown: result.DataUsageDown,
|
DataUsageDown: result.DataUsageDown,
|
||||||
|
@ -58,26 +58,25 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
resultSummary := output.ResultSummaryData{}
|
resultSummary := output.ResultSummaryData{}
|
||||||
netCount := make(map[string]int)
|
netCount := make(map[uint]int)
|
||||||
output.SectionTitle("Results")
|
output.SectionTitle("Results")
|
||||||
for idx, result := range doneResults {
|
for idx, result := range doneResults {
|
||||||
output.ResultItem(output.ResultItemData{
|
output.ResultItem(output.ResultItemData{
|
||||||
ID: result.ID,
|
ID: result.Result.ID,
|
||||||
Index: idx,
|
Index: idx,
|
||||||
TotalCount: len(doneResults),
|
TotalCount: len(doneResults),
|
||||||
Name: result.TestGroupName,
|
Name: result.TestGroupName,
|
||||||
StartTime: result.StartTime,
|
StartTime: result.StartTime,
|
||||||
NetworkName: "FIXME", //result.NetworkName,
|
NetworkName: result.Network.NetworkName,
|
||||||
Country: "FIXME", //result.Country,
|
Country: result.Network.CountryCode,
|
||||||
ASN: "FIXME", //result.ASN,
|
ASN: fmt.Sprintf("AS%d", result.Network.ASN),
|
||||||
Summary: "{}", //result.Summary,
|
Summary: "{}", //result.Summary,
|
||||||
Done: result.IsDone,
|
Done: result.IsDone,
|
||||||
DataUsageUp: result.DataUsageUp,
|
DataUsageUp: result.DataUsageUp,
|
||||||
DataUsageDown: result.DataUsageDown,
|
DataUsageDown: result.DataUsageDown,
|
||||||
})
|
})
|
||||||
resultSummary.TotalTests++
|
resultSummary.TotalTests++
|
||||||
// FIXME
|
netCount[result.Network.ASN]++
|
||||||
// netCount[result.ASN]++
|
|
||||||
resultSummary.TotalDataUsageUp += result.DataUsageUp
|
resultSummary.TotalDataUsageUp += result.DataUsageUp
|
||||||
resultSummary.TotalDataUsageDown += result.DataUsageDown
|
resultSummary.TotalDataUsageDown += result.DataUsageDown
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user