谷歌分析电话的来源

时间:2016-04-08 10:00:18

标签: gatling

我很确定我的测试中没有任何谷歌分析钩子,但我想知道以下消息的来源

15:25:08.883 [New I/O worker #1] DEBUG c.n.h.c.p.n.r.NettyConnectListener - Using non-cached Channel [id: 0x20706c2d, /10.40.36.87:53126 => ssl.google-analytics.com/216.58.197.72:443] for POST '/collect'
15:25:08.937 [New I/O worker #1] DEBUG c.n.h.c.p.netty.handler.HttpProtocol -

Request DefaultHttpRequest(chunked: false)
POST /collect HTTP/1.1
Connection: Keep-Alive
User-Agent: java/1.8.0_60
Content-Length: 135
Content-Type: application/x-www-form-urlencoded
Host: ssl.google-analytics.com
Accept: */*

Response DefaultHttpResponse(chunked: false)
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Date: Fri, 08 Apr 2016 09:55:08 GMT
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Cache-Control: no-cache, no-store, must-revalidate
Last-Modified: Sun, 17 May 1998 03:00:00 GMT
X-Content-Type-Options: nosniff
Content-Type: image/gif
Server: Golfe2
Content-Length: 35
Alternate-Protocol: 443:quic
Alt-Svc: quic=":443"; ma=2592000; v="32,31,30,29,28,27,26,25"

15:25:08.938 [New I/O worker #1] DEBUG c.n.h.c.p.n.channel.ChannelManager - Adding key: https://ssl.google-analytics.com:443 for channel [id: 0x20706c2d, /10.40.36.87:53126 => ssl.google-analytics.com/216.58.197.72:443]

这些行甚至在诸如下面的行之前打印

Simulation com.xx.xx.CustomSimulation started...

将此作为gradle项目运行,以上是控制台输出。

1 个答案:

答案 0 :(得分:0)

由于作者想要跟踪如何使用gatling,这是加入自身的内容。如果你想摆脱它,你可以在gatling.conf配置文件中设置enableGA = false或设置一个系统变量。

由于我还在gradle中使用gatling,我在gradle命令行上设置了系统变量(gradlew -DenableGA = false),然后将所有系统变量传递给javaexec调用中的gatling,即:

task gatling(dependsOn: 'compileTestScala') << {
    javaexec {
        main = 'io.gatling.app.Gatling'
        systemProperties System.getProperties()
        .
        .
    }
}