forked from xapi-project/xen-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update feature/perf from master (xapi-project#6218)
Continuing from xapi-project#6208 The conflict resolution can be reviewed with: `git log --remerge-diff -1 8b8af63` ```diff diff --git a/ocaml/libs/xapi-stdext/lib/xapi-stdext-threads/scheduler.ml b/ocaml/libs/xapi-stdext/lib/xapi-stdext-threads/scheduler.ml remerge CONFLICT (content): Merge conflict in ocaml/libs/xapi-stdext/lib/xapi-stdext-threads/scheduler.ml index 7bace30dae..27cf306995 100644 --- a/ocaml/libs/xapi-stdext/lib/xapi-stdext-threads/scheduler.ml +++ b/ocaml/libs/xapi-stdext/lib/xapi-stdext-threads/scheduler.ml @@ -33,49 +33,8 @@ let (queue : t Ipq.t) = Ipq.create 50 queue_default let lock = Mutex.create () -<<<<<<< 6589d9a (Xapi thread classification - part 2 (xapi-project#6154)) let add_to_queue_span name ty start_span newfunc = let ( ++ ) = Mtime.Span.add in -||||||| 4f3f08f -module Clock = struct - let span s = Mtime.Span.of_uint64_ns (Int64.of_float (s *. 1e9)) - - let span_to_s span = - Mtime.Span.to_uint64_ns span |> Int64.to_float |> fun ns -> ns /. 1e9 - - let add_span clock secs = - (* return mix or max available value if the add overflows *) - match Mtime.add_span clock (span secs) with - | Some t -> - t - | None when secs > 0. -> - Mtime.max_stamp - | None -> - Mtime.min_stamp -end - -let add_to_queue name ty start newfunc = - let ( ++ ) = Clock.add_span in -======= -module Clock = struct - let span s = Mtime.Span.of_uint64_ns (Int64.of_float (s *. 1e9)) - - let span_to_s span = Mtime.Span.to_float_ns span |> fun ns -> ns /. 1e9 - - let add_span clock secs = - (* return mix or max available value if the add overflows *) - match Mtime.add_span clock (span secs) with - | Some t -> - t - | None when secs > 0. -> - Mtime.max_stamp - | None -> - Mtime.min_stamp -end - -let add_to_queue name ty start newfunc = - let ( ++ ) = Clock.add_span in ->>>>>>> 8c9b754 (SDK fixes including CP-53003 (xapi-project#6210)) let item = { Ipq.ev= {func= newfunc; ty; name} ``` This code got deleted in `feature/perf` 6b02474, where `span_to_s` got replaced with `Clock.Timer.span_to_s`, and changed in master by e68cda7. Both achieve the same result: `span_to_s` uses `Mtime.Span.to_float_ns`, except the commit on feature/perf also removes code duplication by reusing the other clock module.
- Loading branch information
Showing
71 changed files
with
2,509 additions
and
2,337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.