<commit_before>/**
 * @file: PoliceDog web performance script for client side
 * @author by zhangxiang
 * @update 2017.05
 */

(function(){
    
    /**
     * Browser compatibility:
     * Some brower cannot handle the interface(window.performance), so we must add some code to compatibile some bowser
     * 
     */


    if(window.addEventListener){

        window.addEventListener('load', function(){


        });

    } else if(window.attachEvent) {

        window.attachEvent('onload', function(){

        });
        
    } else {

        if(window.onload) {

            let loadFunc = window.onload;

            window.onload = function(){


                /**do some thing */

                loadFunc();
            }

        } else {
            window.onload = function(){
                /**do something */
            }
        }

    }

    function getPerformance(){
        let perf = null;
        
        perf = window.performance ? window.performance : (window.wekitPerformance ? window.webkitPerformance : window.msPerformance);

        return perf;
    }<commit_msg>count done , next to bowser compatibility<commit_after>/**
 * @file: PoliceDog web performance script for client side
 * @author by zhangxiang
 * @update 2017.05
 */

(function(){
    
    /**
     * Browser compatibility:
     * Some brower cannot handle the interface(window.performance), so we must add some code to compatibile some bowser
     * 
     */


    if(window.addEventListener){

        window.addEventListener('load', function(){


        });

    } else if(window.attachEvent) {

        window.attachEvent('onload', function(){

        });
        
    } else {

        if(window.onload) {

            let loadFunc = window.onload;

            window.onload = function(){


                /**do some thing */
                
                loadFunc();
            }

        } else {
            window.onload = function(){
                /**do something */
            }
        }

    }

    function getPerformance(){
        let perf = null;
        
        perf = window.performance ? window.performance : (window.wekitPerformance ? window.webkitPerformance : window.msPerformance);

        return perf;
    }
{'fraction_non_alphanumeric': 0.10918003565062388, 'fraction_numerical': 0.0053475935828877, 'mean_word_length': 1.6758045292014303, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1602029', 'n_tokens_mistral': 623, 'n_tokens_neox': 548, 'n_words': 145}