mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-22 22:58:25 +00:00
Also group compiler stats
This commit is contained in:
parent
82621f250c
commit
f5b7e8addd
@ -138,3 +138,10 @@ func byPlatform(s string) string {
|
|||||||
}
|
}
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func byCompiler(s string) string {
|
||||||
|
if strings.HasPrefix(s, "go1.") && len(s) >= 5 {
|
||||||
|
return s[:5]
|
||||||
|
}
|
||||||
|
return "Other"
|
||||||
|
}
|
||||||
|
@ -737,7 +737,7 @@ func getReport(db *sql.DB) map[string]interface{} {
|
|||||||
r["categories"] = categories
|
r["categories"] = categories
|
||||||
r["versions"] = group(byVersion, analyticsFor(versions, 2000), 5)
|
r["versions"] = group(byVersion, analyticsFor(versions, 2000), 5)
|
||||||
r["platforms"] = group(byPlatform, analyticsFor(platforms, 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["builders"] = analyticsFor(builders, 12)
|
||||||
r["features"] = featureList
|
r["features"] = featureList
|
||||||
|
|
||||||
|
@ -216,11 +216,18 @@ found in the LICENSE file.
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{range .compilers}}
|
{{range .compilers}}
|
||||||
<tr>
|
<tr class="main">
|
||||||
<td>{{.Key}}</td>
|
<td>{{.Key}}</td>
|
||||||
<td class="text-right">{{.Count}}</td>
|
<td class="text-right">{{.Count}}</td>
|
||||||
<td class="text-right">{{.Percentage | printf "%.01f"}}%</td>
|
<td class="text-right">{{.Percentage | printf "%.01f"}}%</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
{{range .Items}}
|
||||||
|
<tr class="child">
|
||||||
|
<td class="first">{{.Key}}</td>
|
||||||
|
<td class="text-right">{{.Count}}</td>
|
||||||
|
<td class="text-right">{{.Percentage | printf "%.01f"}}%</td>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user