Skip to content

Instantly share code, notes, and snippets.

@kinow
Created May 19, 2014 04:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kinow/d5a2221c32dce3aa1076 to your computer and use it in GitHub Desktop.
Save kinow/d5a2221c32dce3aa1076 to your computer and use it in GitHub Desktop.
Treemapping Jenkins extension points
library('rjson')
library('portfolio')
download.file(url="https://ci.jenkins-ci.org/view/Infrastructure/job/infra_extension-indexer/ws/extension-points.json", destfile="extension-points.json", method="wget")
extensionPointsJson <- fromJSON(paste(readLines("extension-points.json"), collapse=""))
extensionPoints <- extensionPointsJson$extensionPoints
nExtensionPoints <- length(extensionPointsJson$extensionPoints)
numberOfImplementations <- vector(length = nExtensionPoints)
namesOfTheExtensionPoints <- vector(length = nExtensionPoints)
for (i in seq_along(extensionPoints)) {
extensionName = extensionPoints[[i]]$className
lastIndexOfDot = regexpr("\\.[^\\.]*$", extensionName)
namesOfTheExtensionPoints[[i]] = substr(extensionName, lastIndexOfDot[1]+1, nchar(extensionName))
numberOfImplementations[[i]] = length(extensionPoints[[i]]$implementations)
print(paste(namesOfTheExtensionPoints[[i]], " -> ", numberOfImplementations[[i]]))
}
png(filename="extension-points.png", width=2048, height=1536, units="px", bg="white")
map.market(id=seq_along(extensionPoints), area=numberOfImplementations, group=namesOfTheExtensionPoints, color=numberOfImplementations, main="Jenkins Extension Points")
dev.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment