terminal - 使用 PageSpeed Insights API v5 在终端中使用 curl 查找服务器响应时间
问题描述
使用 PageSpeed Insights API v5 在终端中使用 curl 查找服务器响应时间
例如,如果我在终端中输入这个
curl \'https://pagespeedonline.googleapis.com/pagespeedonline/v5/runPagespeed?url=https://google.com/
&category=performance&strategy=mobile&fields=lighthouseResult.categories.*.score&prettyPrint=false
&key=<MY-KEY>'
将返回
{"lighthouseResult":{"categories":{"performance":{"score":0.68}}}}%
而不是分数,我希望它只返回类似于以下形式的服务器响应时间:
{"lighthouseResult":{"categories":{"performance":{"responseTime":0.68}}}}%
我尝试了以下方法:
fields=lighthouseResult.categories.*.server-response-time
fields=lighthouseResult.categories.*.server-response-time.responseTime
fields=lighthouseResult.categories.audits.server-response-time
fields=lighthouseResult.categories.audits.server-response-time.responseTime
&only-audits=server-response-time
解决方案
推荐阅读
- sql - Oracle SQL Query 使用各种曲线拟合技术执行线性回归
- c# - 写一个异步压缩的进度
- python - 在python中的pdf中添加基于关键字的书签
- python - Airflow 实验性 API - dag 运行从未入队
- parquet - 为什么`plain_dictionary`编码的字典页面偏移量为0?
- mysql - sql合并两个查询结果
- sql - Hive Full Outer Join Returning multiple rows for same Join Key
- docker - 无法浏览到在 Docker 容器中运行的网站
- php - 如何在 PHP 中链接所有页面并排除当前页面
- firebase - 实时数据库规则 - 检查给定数组是否包含 newData.val()