我想在负载下获取一些 PHP 应用程序的指标。为此,我在我的 web 应用程序上生成了很多请求。在 web 应用程序中,我正在收集指标(执行时间、API 请求延迟等),这些指标通过 FirePHP 标头返回给响应。在 JMeter 计划中,我想收集这些信息并直接处理它们以生成图表,或者将它们存储在日志文件中。
响应标头如下所示:
...
X-Wf-1-1-1-31: 610|[{"Type":"LOG","File":"somescript.php","Line":7},{"duration":"1.7108917236328 ms","notes":{"invokation":["Solr_Connector::exec","somescript2.php line : 42"],"size_download":"2167 bytes","query":"...url data ..."},"name":"[tag1][tag2]SOLR REQUEST 1382626844.906"}]|
X-Wf-1-1-1-32: 611|[{"Type":"LOG","File":"somescript.php","Line":7},{"duration":"1.7011165618896 ms","notes":{"invokation":["Solr_Connector::exec","somescript2.php line : 42"],"size_download":"2590 bytes","query":"...url data ..."},"name":"[tag1][tag3]SOLR REQUEST 1382626844.9079"}]|
X-Wf-1-1-1-33: 611|[{"Type":"LOG","File":"somescript.php","Line":7},{"duration":"1.5978813171387 ms","notes":{"invokation":["Solr_Connector::exec","somescript2.php line : 42"],"size_download":"2452 bytes","query":"...url data ..."},"name":"[tag1][tag3]SOLR REQUEST 1382626844.9097"}]|
X-Wf-1-1-1-34: 610|[{"Type":"LOG","File":"somescript.php","Line":7},{"duration":"1.662015914917 ms","notes":{"invokation":["Solr_Connector::exec","somescript2.php line : 42"],"size_download":"3150 bytes","query":"...url data ..."},"name":"[tag1][tag2]SOLR REQUEST 1382626844.9115"}]|
...
如何设置 JMeter 正则表达式提取器以提取名称以 "X-Wf-" 开头的标头的所有值?