抖音开放平台Logo
开发者文档
“/”唤起搜索
控制台
  • JS API 列表
  • 基础
  • tt.canIUse
  • tt.canIPutStuffOverComponent
  • tt.base64ToArrayBuffer
  • tt.arrayBufferToBase64
  • tt.setPageInfo
  • 性能
  • tt.performance.createObserver
  • tt.performance.getEntries
  • tt.performance.getEntriesByName
  • tt.performance.getCurrentPageEntries
  • tt.performance.setBufferSize
  • PerformanceEntry
  • tt.performance.clearMarks
  • tt.performance.mark
  • tt.performance.getEntriesByPage
  • tt.performance.getEntriesByType
  • 线程
  • 窗口尺寸变化
  • 生命周期
  • 版本更新
  • 定时器
  • 应用级事件
  • 环境变量
  • TTML
  • 网络
  • 媒体
  • 地图
  • 文件
  • 数据缓存
  • 地理位置
  • 设备
  • 画布
  • 界面
  • 页面导航
  • 开放接口
  • 行业开放
  • 第三方平台
  • 其它
  • 生活服务(即将废弃)
  • 小程序智能体
  • tt.performance.getEntriesByName
    收藏
    我的收藏

    基础库 1.60.0 开始支持本方法,低版本需做兼容处理。这是一个同步方法。
    获取当前缓冲区中所有名称为 [name] 且类型为 [entryType] 的性能数据。
    性能数据 name 和 性能数据 entryType 可参考性能数据-属性取值

    语法

    tt.performance.getEntriesByName(name, entryType)

    参数说明

    name

    类型
    默认值
    必填
    说明
    最低支持版本
    string
    期望获取的性能数据 name
    1.60.0

    entryType

    类型
    默认值
    必填
    说明
    最低支持版本
    string
    期望获取的性能数据 entryType
    1.60.0

    返回值

    Array, PerformanceEntry 集合。

    扫码体验

    代码示例

    Bug & Tip