zoukankan      html  css  js  c++  java
  • (FFOS Gaia) Telemetry

      AUM是App Usage Metrics的缩写,用于统计FFOS中一些应用的使用情况,并且在用户允许的情况下(Settings中设置),将统计信息上报Telemetry Server。

      

    1. AUM会监控FFOS中的几种应用。

    •   Apps pre-installed with the phone (certified, or using a gaia origin)
    •   Apps installed from the marketplace

    2. Telemetry Server Path

      http://{host}:{port}/{deviceID}/{reason}/{appName}/{appVersion}/{appUpdateChannel}/{appBuildID}

    3. AUM消息格式

      以下是讲flame手机中的AUM功能打开,添加log打印出来的消息格式。

    {
        "ver":1,
        "info":{
            "start":1437968681114,
            "apps":{
            },
            "searches":{
            },
            "stop":1437968928832,
            "deviceID":"7a0f9f11-c8de-421d-939b-878b7e89915e",
            "locale":"en-US",
            "screen":{
                "width":320,
                "height":569,
                "devicePixelRatio":1.5
            },
            "deviceinfo":{
                "developer.menu.enabled":true,
                "deviceinfo.hardware":"qcom",
                "deviceinfo.os":"2.5.0.0-prerelease",
                "deviceinfo.product_model":"flame",
                "deviceinfo.software":"Boot2Gecko 2.5.0.0-prerelease"
            },
            "simInfo":{
                "network":null,
                "icc":null
            },
            "reason":"appusage",
            "appName":"FirefoxOS",
            "appUpdateChannel":"nightly",
            "appBuildID":"20150723141330",
            "appVersion":"42.0a1"
        }
    }

       info->apps字段是关于per-app的信息,参考代码,其消息格式是:

    {
        "per-app-manifestURL-1":{
            "yyyymmdd":{
                "usageTime":0,
                "invocations":0,
                "installs":0,
                "uninstalls":0,
                "activities":{
                }
            }
        },
        "per-app-manifestURL-2":{
            "yyyymmdd":{
                "usageTime":0,
                "invocations":0,
                "installs":0,
                "uninstalls":0,
                "activities":{
                }
            }
        }
    }

      info->searches字段是关于per-search的信息,参考代码,其消息格式是:

    {
        "per-app-provider-1":{
            "yyyymmdd":{
                "count":0
            }
        },
        "per-app-provider-2":{
            "yyyymmdd":{
                "count":0
            }
        }
    }

     4. AUM upload policy

      FFOS中预设的是2 weeks upload。

     5. code分析

      代码比较简单,以后有时间再贴出详细分析(代码位置:gaia/apps/system/js/app_usage_metrics.js)。

  • 相关阅读:
    1011. A+B和C (15)
    1010. 一元多项式求导 (25)
    1009. 说反话 (20)
    1007. 素数对猜想 (20)
    1008. 数组元素循环右移问题 (20)
    1006. 换个格式输出整数 (15)
    1005. 继续(3n+1)猜想 (25)
    算法学习(八)
    算法学习(七)
    算法学习(六)
  • 原文地址:https://www.cnblogs.com/code-4-fun/p/4680274.html
Copyright © 2011-2022 走看看