9

除了在 Gatling 输出中有关 Simulation.log 文件的开始和结束时收到的字节之外,我找不到任何文档。以下是日志中的示例行:

My scenario - Sync  7526052819726874465-2088    REQUEST     My Page 1404439715068   1404439715068   1404439716103   1404439716103   OK

这一切代表什么?我们是否应该在 Gatling 文档的某个地方提供这些信息?

谢谢

编辑 - - - - - - - - - - - - - - - - - - - - - - - - - ---------------------

我浏览了 Gatling 源代码,找到了FileDataWriterSpec ,其中测试了输出到 simulation.log。根据这个规范,我们有一个对象RequestMessage ,它被用作携带记录数据的对象。根据这个类:

case class RequestMessage(
    scenario: String,
    userId: String,
    groupHierarchy: List[String],
    name: String,
    requestStartDate: Long,
    requestEndDate: Long,
    responseStartDate: Long,
    responseEndDate: Long,
    status: Status,
    message: Option[String],
    extraInfo: List[Any]) extends DataWriterMessage {
  def responseTime = responseEndDate - requestStartDate
}

以上必须是:[scenario][userId][[groupHierarchy][name][first/last byte sent timestamp][first/last byte received timestamp][status]

有人可以确认吗?groupHierarchy 到底是什么?

4

3 回答 3

7

缺少记录类型:

[scenario][userId][recordType][groupHierarchy][name][第一个/最后一个字节发送时间戳][第一个/最后一个字节接收时间戳][状态][extraInfo]

关于组,请参阅文档:https ://github.com/excilys/gatling/wiki/Structure-Elements#group

于 2014-07-08T06:09:00.770 回答
3

我将从 2015 年 9 月 10 日起引用Gatling Lead Developer 的回答:

没有记录simulation.log 格式是有充分理由的:它不是公共API,并且会经常更改。

于 2016-12-09T06:11:11.720 回答
1

你可以看看这个仓库:https ://github.com/nuxeo/gatling-report/tree/master/src/main/java/org/nuxeo/tools/gatling/report

有针对不同 gatling 版本的 java 解析器实现。逆向工程......但总比没有好

于 2019-09-10T14:42:34.443 回答