Я загрузил gatling как зависимость от maven, и теперь я ищу, как переопределить файл gatling.conf, чтобы настроить соединение между gatling и графитом.Как переопределить gatling.conf для конфигурации графита?
Так что я создал gatling.conf файл вроде этого:
data {
writers = [console, file, graphite] # The list of DataWriters to which Gatling write simulation data (currently supported : console, file, graphite, jdbc)
reader = file # The DataReader used by the charting engine for reading simulation results
console {
light = false # When set to true, displays a light version without detailed request stats
}
file {
bufferSize = 8192 # FileDataWriter's internal data buffer size, in bytes
}
leak {
noActivityTimeout = 30 # Period, in seconds, for which Gatling may have no activity before considering a leak may be happening
}
graphite {
light = false # only send the all* stats
host = "mygraphite.host.com" # The host where the Carbon server is located
port = 1010 # The port to which the Carbon server listens to (2003 is default for plaintext, 2004 is default for pickle)
protocol = "tcp" # The protocol used to send data to Carbon (currently supported : "tcp", "udp")
rootPathPrefix = "gatling" # The common prefix of all metrics sent to Graphite
bufferSize = 8192 # GraphiteDataWriter's internal data buffer size, in bytes
writeInterval = 1 # GraphiteDataWriter's write interval, in seconds
}
}
Внутри моей Src/основной/ресурсы/конф/gatling.conf
Вот мой pom.xml:
<build>
<plugins>
<plugin>
<groupId>io.gatling</groupId>
<artifactId>gatling-maven-plugin</artifactId>
<version>${gatling-plugin.version}</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<configFolder>src/main/resources/conf/</configFolder>
<!-- Default values -->
<!--<configFolder>src/test/resources</configFolder-->
<dataFolder>src/main/resources/data</dataFolder>
<resultsFolder>target/gatling/results</resultsFolder>
<!--<!–<requestBodiesFolder>src/test/resources/request-bodies</requestBodiesFolder>-->
<simulationsFolder>src/main/scala</simulationsFolder>
<simulationClass>my.awesomeCompany.scenarios.Scenarios</simulationClass>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Что я делаю неправильно, есть ли другой способ сделать это с конфигурационным файлом? Или мне придется переопределить все параметры с помощью jvm args?
Cheers.
Остерегайтесь: не перекрывая все пути, чтобы указать на 'src/main/resources', вы смешиваете основные ресурсы и тестовые ресурсы ... Пробовали ли вы по умолчанию пути? –
Просто попробовал, ничего не меняет. Я работаю над полным проектом gatling/scala, который нуждается в этом собственном тесте (для тестового проекта, в начале пятна), поэтому все находится в основной папке. –
Действительно ли gatling.conf вы отправили весь файл? –