Skip to content

Instantly share code, notes, and snippets.

@jonase
Created December 25, 2012 17:58
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 jonase/4374467 to your computer and use it in GitHub Desktop.
Save jonase/4374467 to your computer and use it in GitHub Desktop.
;; Given a class name, which methods have changed the most?
(->> (q '[:find ?name (count ?sha)
:in $ ?class-name
:where
[?codeq :java/class-name ?class-name]
[?mcodeq :codeq/parent ?codeq]
[?mcodeq :java/method ?codename]
[?codename :code/name ?name]
[?mcodeq :codeq/code ?code]
[?code :code/sha ?sha]]
db "Compiler")
(sort-by second)
reverse
(take 10)
clojure.pprint/pprint)
@stuarthalloway
Copy link

(sort-by (comp - second))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment