mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
move memory monitor benchamrk to single indexing stress test
This commit is contained in:
parent
ef64f5d970
commit
4c00e89f5e
@ -65,7 +65,8 @@ public class SingleThreadIndexingStress {
|
|||||||
StopWatch stopWatch = new StopWatch().start();
|
StopWatch stopWatch = new StopWatch().start();
|
||||||
int COUNT = 200000;
|
int COUNT = 200000;
|
||||||
System.out.println("Indexing [" + COUNT + "] ...");
|
System.out.println("Indexing [" + COUNT + "] ...");
|
||||||
for (int i = 0; i < COUNT; i++) {
|
int i = 1;
|
||||||
|
for (; i <= COUNT; i++) {
|
||||||
client1.index(
|
client1.index(
|
||||||
indexRequest("test")
|
indexRequest("test")
|
||||||
.type("type1")
|
.type("type1")
|
||||||
@ -74,11 +75,10 @@ public class SingleThreadIndexingStress {
|
|||||||
.opType(IndexRequest.OpType.INDEX)
|
.opType(IndexRequest.OpType.INDEX)
|
||||||
).actionGet();
|
).actionGet();
|
||||||
if ((i % 10000) == 0) {
|
if ((i % 10000) == 0) {
|
||||||
System.out.println("Indexed 10000, total " + (i + 10000) + " took " + stopWatch.stop().lastTaskTime());
|
System.out.println("Indexed " + i + " took " + stopWatch.stop().lastTaskTime());
|
||||||
stopWatch.start();
|
stopWatch.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stopWatch.stop();
|
|
||||||
System.out.println("Indexing took " + stopWatch.totalTime() + ", TPS " + (((double) COUNT) / stopWatch.totalTime().secondsFrac()));
|
System.out.println("Indexing took " + stopWatch.totalTime() + ", TPS " + (((double) COUNT) / stopWatch.totalTime().secondsFrac()));
|
||||||
|
|
||||||
client.close();
|
client.close();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user