src/vs/platform/diagnostics/node/diagnosticsService.ts/asSortedItems
function asSortedItems(items: Map<string, number>): WorkspaceStatItem[] {
	return [
		...Iterable.map(items.entries(), ([name, count]) => ({ name: name, count: count }))
	].sort((a, b) => b.count - a.count);
}