• (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)。

  • 相关阅读:
    跑步前后吃什么?
    英雄杀八人场心得
    如何判断JavaScript数据具体类型
    js实现时间日期的格式化
    各个公司前端笔试题回顾
    原型模式Prototype,constructor,__proto__详解
    二级菜单不同方法的实现
    秋招笔试碰到的疑难题目1
    php和mysql学习问题笔记
    es6学习笔记12--Class
  • 原文地址:https://www.cnblogs.com/code-4-fun/p/4680274.html
Copyright © 2020-2023  润新知