AnalysisSummary

用 JSON 表示;按数据包列表、事务和分析引擎提供分析摘要的内容。

GET

[基本地址]/shunra/api/analysis/summary/{runresulthandle}/{plid}/{reportId}/{engineId}

例如: http://localhost:8182/shunra/api/analysis/summary/b80de7f5ffa97428b2324c8b3a9d469b/620984c9a31b4ef694a1ac47d61b6a7e/-561678026/best%20practice

GET

[基本地址]/shunra/api/analysis/summary/{runresulthandle}/{plid}/{reportId}/{trId}/{engineId}

例如: http://localhost:8182/shunra/api/analysis/summary/b80de7f5ffa97428b2324c8b3a9d469b/620984c9a31b4ef694a1ac47d61b6a7e/-561678026/best%20practices

第一个调用会为数据包列表中的所有事务返回请求的分析报告。第二个调用仅为指定的事务返回请求的分析报告。

当前支持以下报告类型:

  • http:HTTP 分析
  • best practices:优化报告
  • iostats:吞吐量报告
  • general/waterfall:一般分析
  • metrics: 协议的摘要和度量报告
  • networkmeasurements:端点延迟报告
  • harExport: 包含 HAR 格式的 HTTP 子事务的报告 (试验)

响应

GET

’/shunra/api/analysis/summary/%s/%s/%s/%s/%s'%(run_result_handle, packetlist_id, report_id, transaction_id, engine_id)

返回

resp['successfullTransactionAnalysis'][0]['result'] ???

  • 200“正常”
  • 404“找不到”
  • 500“内部服务器错误”

代码示例

	def get_analysis_report(run_result_handle, packetlist_id, report_id, transaction_id, engine_id):
	"""
	Get the result of running one of the analysis engines on a given packet list
	"""
	
	resp = get('/shunra/api/analysis/summary/%s/%s/%s/%s/%s'%(run_result_handle, packetlist_id, report_id, transaction_id, engine_id))
	return resp['successfullTransactionAnalysis'][0]['result']