<commit_before>package com.licaigc.statistics;

import android.os.Build;

import com.licaigc.DeviceInfo;
import com.licaigc.ManifestUtils;
import com.licaigc.PackageUtils;
import com.licaigc.Transformer;

import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Map;

import rx.Observable;
import rx.Subscriber;
import rx.functions.Func1;
import rx.schedulers.Schedulers;

/**
 * Created by walfud on 2016/7/7.
 */
public class Statistics {
    public static final String TAG = "Statistics";

    public static final int OS_ANDROID = 1;
    public static final int OS_IOS = 2;
    public static final int OS_UNKNOWN = 3;

    public static final int APP_ID_TALICAI = 1;
    public static final int APP_ID_GUIHUA = 2;
    public static final int APP_ID_TIMI = 3;
    public static final int APP_ID_JIJINDOU = 4;

    public static void reportStartupInfo(int appId) {
        final String REPORT_URL = "http://click.licaigc.cn/r/app";
        Map<String, String> params = Transformer.asMap(
                "mac", DeviceInfo.getMacAddress(),
                "imei", DeviceInfo.getImei(),
                "model", Build.MANUFACTURER,
                "androidid", DeviceInfo.getAndroidId(),
                "os", String.valueOf(OS_ANDROID),
                "version", PackageUtils.getVersionName(),
                "versioncode", String.valueOf(PackageUtils.getVersionCode()),
                "channel", ManifestUtils.getMeta("UMENG_CHANNEL"),
                "ip", DeviceInfo.getIpAddress(),
                "site", String.valueOf(APP_ID_TIMI)
        );
        final String param = Transformer.map2HttpGetParam(params, true, Transformer.MAP2HTTPGETPARAM_SKIP_EMPTY);
        Observable.<Void>just(null)
                .observeOn(Schedulers.io())
                .map(new Func1<Void, Void>() {
                    @Override<commit_msg>`reportStartupInfo` GET 参数修改<commit_after>package com.licaigc.statistics;

import android.os.Build;

import com.licaigc.DeviceInfo;
import com.licaigc.ManifestUtils;
import com.licaigc.PackageUtils;
import com.licaigc.Transformer;

import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Map;

import rx.Observable;
import rx.Subscriber;
import rx.functions.Func1;
import rx.schedulers.Schedulers;

/**
 * Created by walfud on 2016/7/7.
 */
public class Statistics {
    public static final String TAG = "Statistics";

    public static final int OS_ANDROID = 1;
    public static final int OS_IOS = 2;
    public static final int OS_UNKNOWN = 3;

    public static final int APP_ID_TALICAI = 1;
    public static final int APP_ID_GUIHUA = 2;
    public static final int APP_ID_TIMI = 3;
    public static final int APP_ID_JIJINDOU = 4;

    public static void reportStartupInfo(int appId) {
        final String REPORT_URL = "http://click.licaigc.cn/r/app";
        Map<String, String> params = Transformer.asMap(
                "os", String.valueOf(OS_ANDROID),
                "osversion", Build.VERSION.RELEASE,
                "mac", DeviceInfo.getMacAddress(),
                "imei", DeviceInfo.getImei(),
                "androidid", DeviceInfo.getAndroidId(),
                "model", Build.MANUFACTURER,
                "appversion", PackageUtils.getVersionName(),
                "buildcode", String.valueOf(PackageUtils.getVersionCode()),
                "channel", ManifestUtils.getMeta("UMENG_CHANNEL"),
                "ip", DeviceInfo.getIpAddress(),
                "site", String.valueOf(APP_ID_TIMI)
        );
        final String param = Transformer.map2HttpGetParam(params, true, Transformer.MAP2HTTPGETPARAM_SKIP_EMPTY);
        Observable.<Void>just(null)
                .observeOn(Schedulers.io())
                .map(new Func1<Void, Void>() {
                    @Override
{'fraction_non_alphanumeric': 0.1029723991507431, 'fraction_numerical': 0.009023354564755838, 'mean_word_length': 2.7206317867719645, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '4262441', 'n_tokens_mistral': 1197, 'n_tokens_neox': 1146, 'n_words': 257}