diff --git a/cmd/ursrv/analytics.go b/cmd/ursrv/analytics.go index 5416b368c..93a7cf5bb 100644 --- a/cmd/ursrv/analytics.go +++ b/cmd/ursrv/analytics.go @@ -138,3 +138,10 @@ func byPlatform(s string) string { } return s } + +func byCompiler(s string) string { + if strings.HasPrefix(s, "go1.") && len(s) >= 5 { + return s[:5] + } + return "Other" +} diff --git a/cmd/ursrv/main.go b/cmd/ursrv/main.go index 725dbc4d8..b30474217 100644 --- a/cmd/ursrv/main.go +++ b/cmd/ursrv/main.go @@ -737,7 +737,7 @@ func getReport(db *sql.DB) map[string]interface{} { r["categories"] = categories r["versions"] = group(byVersion, analyticsFor(versions, 2000), 5) r["platforms"] = group(byPlatform, analyticsFor(platforms, 2000), 5) - r["compilers"] = analyticsFor(compilers, 12) + r["compilers"] = group(byCompiler, analyticsFor(compilers, 2000), 3) r["builders"] = analyticsFor(builders, 12) r["features"] = featureList diff --git a/static/index.html b/static/index.html index 4793e55f4..662823748 100644 --- a/static/index.html +++ b/static/index.html @@ -216,11 +216,18 @@ found in the LICENSE file. {{range .compilers}} - - {{.Key}} - {{.Count}} - {{.Percentage | printf "%.01f"}}% - + + {{.Key}} + {{.Count}} + {{.Percentage | printf "%.01f"}}% + + {{range .Items}} + + {{.Key}} + {{.Count}} + {{.Percentage | printf "%.01f"}}% + + {{end}} {{end}}