Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return "pages" as unit for scrolls #467

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion esrally/driver/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ def scroll_query(self, es, params):
"weight": retrieved_pages,
"pages": retrieved_pages,
"hits": hits,
"unit": "ops",
"unit": "pages",
"timed_out": timed_out,
"took": took
}
Expand Down
10 changes: 5 additions & 5 deletions tests/driver/runner_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ def test_scroll_query_only_one_page(self, es):
self.assertEqual(1, results["pages"])
self.assertEqual(2, results["hits"])
self.assertEqual(4, results["took"])
self.assertEqual("ops", results["unit"])
self.assertEqual("pages", results["unit"])
self.assertFalse(results["timed_out"])
self.assertFalse("error-type" in results)

Expand Down Expand Up @@ -692,7 +692,7 @@ def test_scroll_query_only_one_page_only_request_body_defined(self, es):
self.assertEqual(1, results["pages"])
self.assertEqual(2, results["hits"])
self.assertEqual(4, results["took"])
self.assertEqual("ops", results["unit"])
self.assertEqual("pages", results["unit"])
self.assertFalse(results["timed_out"])
self.assertFalse("error-type" in results)

Expand Down Expand Up @@ -756,7 +756,7 @@ def test_scroll_query_with_explicit_number_of_pages(self, es):
self.assertEqual(2, results["pages"])
self.assertEqual(3, results["hits"])
self.assertEqual(79, results["took"])
self.assertEqual("ops", results["unit"])
self.assertEqual("pages", results["unit"])
self.assertTrue(results["timed_out"])
self.assertFalse("error-type" in results)

Expand Down Expand Up @@ -812,7 +812,7 @@ def test_scroll_query_early_termination(self, es):
self.assertEqual(2, results["weight"])
self.assertEqual(2, results["pages"])
self.assertEqual(1, results["hits"])
self.assertEqual("ops", results["unit"])
self.assertEqual("pages", results["unit"])
self.assertEqual(55, results["took"])
self.assertFalse("error-type" in results)

Expand Down Expand Up @@ -878,7 +878,7 @@ def test_scroll_query_request_all_pages(self, es):
self.assertEqual(2, results["pages"])
self.assertEqual(4, results["hits"])
self.assertEqual(900, results["took"])
self.assertEqual("ops", results["unit"])
self.assertEqual("pages", results["unit"])
self.assertFalse(results["timed_out"])
self.assertFalse("error-type" in results)

Expand Down