indexing description: "benchmark mutex locks and unlocks. " library: "elogger" copyright: "Copyright (c) 2006, AXA Rosenberg, and others (see copyright.txt)" author: "Ulrich Weiss, and others" license: "Eiffel Forum License v2 (see forum.txt)" date: "$Date: $" revision: "$Revision: $" archive: "$Archive: $" class ELOG_BENCHMARK_MUTEX inherit ELOG_BENCHMARK_CASE feature -- Access run is -- run the benchmark local i: INTEGER m: MUTEX do create m.make start from i := 0 until i > iterations loop m.lock m.unlock i := i + 1 end stop io.putstring ("mutex lock&unlock: "+iterations_per_second.rounded.out+"it/s, "+cycles_per_iteration.out+"cycles/it%N") end iterations: INTEGER_64 is 10_000_000 -- nr of iterations end