Created
December 25, 2012 17:58
-
-
Save jonase/4374467 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(sort-by (comp - second))