# Relative index time metrics?

**URL:** <https://discuss.elastic.co/t/relative-index-time-metrics/270583>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [April 19, 2021, 1:15pm UTC](https://discuss.elastic.co/t/relative-index-time-metrics/270583 "2021-04-19T13:15:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alsyia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alsyia/32/87334_2.png) [@alsyia](https://discuss.elastic.co/u/alsyia)\
**Post date:** [April 19, 2021, 1:15pm UTC](https://discuss.elastic.co/t/relative-index-time-metrics/270583/1 "2021-04-19T13:15:38Z")

</div>

Hello,

I'm running ESRally against an existing (test/staging) cluster (whose traffic I can stop if needed for the benchmark duration) and I would like to compare the resulting benchmark against a new, empty cluster. I'm using `--pipeline=benchmark-only` in both cases, but the Index time metrics (cumulative indexing time, etc) are not comparable.

My understanding is that this is because the old cluster has been running for quite some time now, and ESRally fetches the Index time metrics only once, at the end of the benchmark, for _all_ indices, including those which have not been modified by the benchmark. Is this correct?

Is there a way to configure Rally so that it either:

- Displays only the difference between start and end values for all metrics
- Collect metrics only for the indices the track uses ?

That would help me getting comparable results, I think.

If I request the index stats API manually on each cluster, for the index the track works on, I get figures that looks comparable to me. Can you confirm this is the method I should use if Rally doesn't support it natively?

Thank you very much!

---

<div class="post-metadata">

**Author:** ![RickBoyd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rickboyd/32/80022_2.png) [@RickBoyd](https://discuss.elastic.co/u/RickBoyd)\
**Post date:** [April 19, 2021, 1:32pm UTC](https://discuss.elastic.co/t/relative-index-time-metrics/270583/2 "2021-04-19T13:32:45Z")

</div>

Hi! What you're asking for is not possible at this time, though we always welcome contributions to [Rally](https://github.com/elastic/rally) if you would find this functionality useful.

Please note that though that even outside of the metrics question, the situation you're describing indicates you should run a cluster restart prior to test execution (see #6 in the blog [Seven Tips for Better Elasticsearch Benchmarks](https://www.elastic.co/blog/seven-tips-for-better-elasticsearch-benchmarks))

Hope that helps  
Rick B

---

<div class="post-metadata">

**Author:** ![alsyia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alsyia/32/87334_2.png) [@alsyia](https://discuss.elastic.co/u/alsyia)\
**Post date:** [April 19, 2021, 1:55pm UTC](https://discuss.elastic.co/t/relative-index-time-metrics/270583/3 "2021-04-19T13:55:11Z")

</div>

Hello,

Thanks for the quick reply! I hadn't realized clusters needed to be restarted before each benchmark (although Rally results have been remarkably consistent in the tests I've done). Thanks for the tip!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 17, 2021, 1:56pm UTC](https://discuss.elastic.co/t/relative-index-time-metrics/270583/4 "2021-05-17T13:56:03Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
