gain mastery vs get the knack of

gain mastery

get the knack of

How often have the words gain mastery and get the knack of occurred in a corpus of books? (source: Google Ngram Viewer )