indexing description: "[ Test for Eiffel-GigaSpaces wrapper loosely based on POCO benchmark example ]" status: "See notice at end of class." legal: "See notice at end of class." date: "$Date$" revision: "$Revision$" class BENCHMARK_TEST_READ_MULTIPLE inherit BENCHMARK_TEST redefine set_up, run end feature name: STRING is -- do Result := "readMultiple" end set_up is local batch_count: INTEGER tmp_lease: ANY i, j: INTEGER batch: ARRAY[BENCHMARK_BASE_OBJECT] object: BENCHMARK_BASE_OBJECT do if not failed then batch_count := benchmark.iterations // benchmark.batch_size create batch.make (1, benchmark.batch_size) from i := batch.lower until failed or i > batch.upper loop batch.put (create_new_object_for_benchmark, i) i := i+1 end from i := 1 until i > batch_count loop from j := batch.lower until failed or j > batch.upper loop object := batch.item (j) set_id (object, i); j := j + 1 end tmp_lease := space_proxy.write_multiple (batch, transaction, {EGS_LEASE}.forever); failed := test_exception i := i + 1 end end rescue -- Note that this code is only for raise_xap_exception exceptions_handling_discipline handle_raised_exception (exception_manager.last_exception) failed := True retry end run is local batch_count: INTEGER template: BENCHMARK_BASE_OBJECT i: INTEGER res: ARRAY[EGS_ENTRY] total_read: INTEGER do if not failed then batch_count := benchmark.iterations // benchmark.batch_size template := create_new_object_template from i := 1 until failed or i > batch_count loop start_timing create_transaction set_id (template, i); res := space_proxy.read_multiple (template, transaction, benchmark.batch_size, {EGS_READ_MODIFIERS}.repeatable_read); failed := test_exception total_read := total_read + res.count commit_transaction end_timing i := i + 1 end end rescue -- Note that this code is only for raise_xap_exception exceptions_handling_discipline handle_raised_exception (exception_manager.last_exception) failed := True retry end feature {NONE} -- Implementation run_iteration (index: INTEGER) is -- do end indexing copyright: "Copyright (c) 2008, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 356 Storke Road, Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end