Skip to content

Commit fe2aef7

Browse files
committed
Corrected merging errors
1 parent 2a82404 commit fe2aef7

File tree

2 files changed

+0
-63
lines changed

2 files changed

+0
-63
lines changed

bench/bench_atomic_skiplist.ml

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -31,80 +31,22 @@ let write_heavy_workload num_elems num_threads =
3131
workload num_elems num_threads 0.5 0.5
3232

3333
(* A regular workload with 90% reads, 9% adds and 1% removes. *)
34-
<<<<<<< HEAD
35-
let read_heavy_workload () =
36-
let sl = Atomicskiplist.create () in
37-
let elems = Array.init num_elems (fun _ -> Random.int 10000) in
38-
let push = (fun () -> Domain.spawn ( fun () ->
39-
let start_time = Unix.gettimeofday () in
40-
for i = 0 to (num_elems - 1) do (
41-
if i mod 1000 < 90 then
42-
Atomicskiplist.add sl elems.(i) |> ignore
43-
else if i mod 1000 >= 90 && i mod 1000 < 100 then
44-
Atomicskiplist.remove sl elems.(i) |> ignore
45-
else
46-
Atomicskiplist.find sl elems.(i) |> ignore
47-
)
48-
done;
49-
start_time
50-
)) in
51-
let threads = List.init num_threads (fun _ -> push ()) in
52-
let start_time_threads = List.map (fun domain -> Domain.join domain) threads in
53-
let end_time = Unix.gettimeofday () in
54-
let time_diff = end_time -. (List.nth start_time_threads 0) in
55-
time_diff
56-
57-
58-
let moderate_heavy_workload () =
59-
let sl = Atomicskiplist.create () in
60-
let elems = Array.init num_elems (fun _ -> Random.int 10000) in
61-
let push = (fun () -> Domain.spawn ( fun () ->
62-
let start_time = Unix.gettimeofday () in
63-
for i = 0 to (num_elems - 1) do (
64-
if i mod 1000 < 200 then
65-
Atomicskiplist.add sl elems.(i) |> ignore
66-
else if i mod 1000 >= 200 && i mod 1000 < 300 then
67-
Atomicskiplist.remove sl elems.(i) |> ignore
68-
else
69-
Atomicskiplist.find sl elems.(i) |> ignore
70-
)
71-
done;
72-
start_time
73-
)) in
74-
let threads = List.init num_threads (fun _ -> push ()) in
75-
let start_time_threads = List.map (fun domain -> Domain.join domain) threads in
76-
let end_time = Unix.gettimeofday () in
77-
let time_diff = end_time -. (List.nth start_time_threads 0) in
78-
time_diff
79-
80-
=======
8134
let read_heavy_workload num_elems num_threads =
8235
workload num_elems num_threads 0.09 0.01
8336

8437
let moderate_heavy_workload num_elems num_threads =
8538
workload num_elems num_threads 0.2 0.1
86-
>>>>>>> testing
8739

8840
let balanced_heavy_workload num_elems num_threads =
8941
workload num_elems num_threads 0.3 0.2
9042

9143
let bench ~workload_type ~num_elems ~num_threads () =
9244
let workload =
93-
<<<<<<< HEAD
94-
if workload_type = "read_heavy" then
95-
read_heavy_workload
96-
else if workload_type == "moderate_heavy" then
97-
moderate_heavy_workload
98-
else
99-
write_heavy_workload
100-
in
101-
=======
10245
if workload_type = "read_heavy" then read_heavy_workload
10346
else if workload_type = "moderate_heavy" then moderate_heavy_workload
10447
else if workload_type = "balanced_heavy" then balanced_heavy_workload
10548
else write_heavy_workload
10649
in
107-
>>>>>>> testing
10850
let results = ref [] in
10951
for i = 1 to 10 do
11052
let time = workload num_elems num_threads in

bench/main.ml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,10 @@ let benchmark_list =
1616
Mpmc_queue.bench ~use_cas:true ~takers:4 ~pushers:4;
1717
Mpmc_queue.bench ~use_cas:true ~takers:1 ~pushers:8;
1818
Mpmc_queue.bench ~use_cas:true ~takers:8 ~pushers:1;
19-
<<<<<<< HEAD
20-
Bench_atomic_skiplist.bench ~workload_type:"read_heavy";
21-
Bench_atomic_skiplist.bench ~workload_type:"moderate_heavy";
22-
=======
2319
Bench_atomic_skiplist.bench ~workload_type:"read_heavy" ~num_elems:2000000
2420
~num_threads:2;
2521
Bench_atomic_skiplist.bench ~workload_type:"moderate_heavy"
2622
~num_elems:2000000 ~num_threads:2;
27-
>>>>>>> testing
2823
]
2924
@ backoff_benchmarks
3025

0 commit comments

Comments
 (0)