HOW to find indexing performance

I'm new to elastic search. can anyone please tell me how to update stats on numbers of docs indexed per second?

I don't understand the question, can you try to rephrase maybe? Are you trying to optimize for indexing throughput?

I should use the java API to index few docs and find the no. of docs indexed per second using the same(Java API)