将多个数据同时推送到 influxdb 时丢失数据。?
Missing of data while pushing multiple data simultaneously to influxdb.?
我在一些代码的帮助下使用 JMeter 同时将数据推送到 influxdb。数据被推送到数据库,但如果代码必须推送 100 个数据,流入数据库只会填充 96 或 97 个条目。当内置流入监听器推送 100 个条目时,我的代码无法将所有一百个条目推送到流入。我的代码片段如下。
InfluxDB influxDB = InfluxDBFactory.connect(“http:/l/ocalhost:8086”,“TestingDB,”");
influxDB.createDatabase(“MYTestData”);
Point point1 = Point.measurement(“myTable”)
.time(System.currentTimeMillis() , TimeUnit.MILLISECONDS)
.tag(“CustomerID”,"ID1234 ")
.tag(“empID”,"emp1234 ")
.tag(“TestID”,“test12343”)
influxDB.write(“DBname”, “autogen”, point1);
如果我 运行 10 个用户使用相同的代码进行 10 次迭代,我需要获得 100 个数据点,而我只获得 95 个或更多条目。
为什么内置监听可以100%推送数据而我不行???
这可能是因为 Beanshell 在高负载时存在已知的性能问题。
如果您想使用 JMeter 脚本功能,请确保使用 JSR223 Test Elements and Groovy 语言。
更好的选择是使用实现您的自定义 Listener - check out How to write a plugin for JMeter。
我在一些代码的帮助下使用 JMeter 同时将数据推送到 influxdb。数据被推送到数据库,但如果代码必须推送 100 个数据,流入数据库只会填充 96 或 97 个条目。当内置流入监听器推送 100 个条目时,我的代码无法将所有一百个条目推送到流入。我的代码片段如下。
InfluxDB influxDB = InfluxDBFactory.connect(“http:/l/ocalhost:8086”,“TestingDB,”");
influxDB.createDatabase(“MYTestData”);
Point point1 = Point.measurement(“myTable”)
.time(System.currentTimeMillis() , TimeUnit.MILLISECONDS)
.tag(“CustomerID”,"ID1234 ")
.tag(“empID”,"emp1234 ")
.tag(“TestID”,“test12343”)
influxDB.write(“DBname”, “autogen”, point1);
如果我 运行 10 个用户使用相同的代码进行 10 次迭代,我需要获得 100 个数据点,而我只获得 95 个或更多条目。 为什么内置监听可以100%推送数据而我不行???
这可能是因为 Beanshell 在高负载时存在已知的性能问题。
如果您想使用 JMeter 脚本功能,请确保使用 JSR223 Test Elements and Groovy 语言。
更好的选择是使用实现您的自定义 Listener - check out How to write a plugin for JMeter。