<commit_before># MethodTimeCost
A gradle plugin to show time costs of methods on `main-thread`.

## How to use
Just several lines.

#### add dependency in the build.gradle of the `root project`.

    dependencies {
        classpath 'com.xiaobo.plugin:method-time-cost:1.1.2'

        ...
    }

#### add dependency in the build.gradle of your `application module`.

    dependencies {
        compile 'com.xiaobo.plugin:method-time-cost_runtime:1.1.1'

        ...
    }

#### Apply the plugin in the build.gradle of your `application module`.

    apply plugin: 'com.xiaobo.method_time_cost'
    method_time_cost {
        enable = true           // optional, default is true.
        costBiggerThan = 20     // optional, default is 0. ==> show log of methods cost time >= 0
        tag = "xiaobo"          // optional, default is MethodTimeCost
    }

## How it works

    class Test {
        public int add (int a, int b) {
            int result = a + b;
            return result;
        }
    }

will change into

    class Test {
        static LinkedList<Long> __time_list = new LinkedList<Long>();
        public int add (int a, int b) {
            __time_list.push(System.currentTimeMillis());
            int result = a + b;
            Log.d(TAG, "" + System.currentTimeMillis() - __time_list.pop());
            return result;
        }
    }

The code is inserted by Java Assist.

## Suggestion
Just use the plugin under debug mode. For it will insert code into your source class files, which will increases the size of your apk.

## Others<commit_msg>You'd better use the terminal to build apk.<commit_after># MethodTimeCost
A gradle plugin to show time costs of methods on `main-thread`.

## How to use
Just several lines.

#### add dependency in the build.gradle of the `root project`.

    dependencies {
        classpath 'com.xiaobo.plugin:method-time-cost:1.1.2'

        ...
    }

#### add dependency in the build.gradle of your `application module`.

    dependencies {
        compile 'com.xiaobo.plugin:method-time-cost_runtime:1.1.1'

        ...
    }

#### Apply the plugin in the build.gradle of your `application module`.

    apply plugin: 'com.xiaobo.method_time_cost'
    method_time_cost {
        enable = true           // optional, default is true.
        costBiggerThan = 20     // optional, default is 0. ==> show log of methods cost time >= 0
        tag = "xiaobo"          // optional, default is MethodTimeCost
    }

#### You'd better use the terminal to build apk.

    `gradlew assembleDebug`

## How it works

    class Test {
        public int add (int a, int b) {
            int result = a + b;
            return result;
        }
    }

will change into

    class Test {
        static LinkedList<Long> __time_list = new LinkedList<Long>();
        public int add (int a, int b) {
            __time_list.push(System.currentTimeMillis());
            int result = a + b;
            Log.d(TAG, "" + System.currentTimeMillis() - __time_list.pop());
            return result;
        }
    }

The code is inserted by Java Assist.

## Suggestion
Just use the plugin under debug mode. For it will insert code into your source class files, which will increases the size of your apk.

## Others
{'fraction_non_alphanumeric': 0.09849184364419822, 'fraction_numerical': 0.006155740227762389, 'mean_word_length': 2.1894013738959766, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1475372', 'n_tokens_mistral': 955, 'n_tokens_neox': 911, 'n_words': 338}