Skip to content

Conversation

@edwintorok
Copy link
Contributor

For easier reviewing, but this is already part of #5378

johnelse and others added 30 commits April 3, 2013 13:00
Signed-off-by: John Else <john.else@citrix.com>
Signed-off-by: John Else <john.else@citrix.com>
Signed-off-by: John Else <john.else@citrix.com>
Signed-off-by: John Else <john.else@citrix.com>
Signed-off-by: John Else <john.else@citrix.com>
Signed-off-by: John Else <john.else@citrix.com>
Signed-off-by: John Else <john.else@citrix.com>
Signed-off-by: John Else <john.else@citrix.com>
Previously we temporarily allocated an enormous data structure in
memory with partially applied functions all over the place. Now
we don't.

This commit also adds a couple of test programs and some helper
functions to Rrd (of_file and to_file) and removes some dead code.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
CA-107919: Reduce memory usage when writing large RRDs.
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add standard files, make initial release
Imported from xen-api.git f35f24e

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
Imported-by: John Else <john.else@citrix.com>
CA-102285: Use the stream API to read the XML RRD file.
(because they don't create any artifacts whose timestamps are tracked
by make)

Signed-off-by: David Scott <dave.scott@citrix.com>
Signed-off-by: David Scott <dave.scott@citrix.com>
Only this repo needs the Fring module.

Signed-off-by: David Scott <dave.scott@citrix.com>
Signed-off-by: David Scott <dave.scott@citrix.com>
Signed-off-by: David Scott <dave.scott@citrix.com>
Signed-off-by: David Scott <dave.scott@citrix.com>
Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
psafont and others added 28 commits March 26, 2021 15:38
Signed-off-by: Pau Ruiz Safont <pau.safont@citrix.com>
Signed-off-by: Pau Ruiz Safont <pau.safont@citrix.com>
Signed-off-by: Pau Ruiz Safont <pau.safont@citrix.com>
Most of it was unused or was duplicated code from xapi_stdext, moved the
little code useful for testing into the testing module, which now uses
stdext functions.

Signed-off-by: Pau Ruiz Safont <pau.safont@citrix.com>
Signed-off-by: Pau Ruiz Safont <pau.safont@citrix.com>
Remove duplicated and unused code around file descriptors and (de)serialization
Signed-off-by: Pau Ruiz Safont <pau.safont@citrix.com>
On the perf runs I made xcp-rrdd was spending almost 60% of the time in
this function, due to the polymorphic compare if List.assoc.

Instead of list, use maps with string comparison to avoid most of the
cost, then incur the time once instead of twice.

I elected to not change the interface of the function since most of the
time building the associative list was done in an ad-hoc way anyway, so
it can be built here instead

Signed-off-by: Pau Ruiz Safont <pau.safont@citrix.com>
Signed-off-by: Pau Ruiz Safont <pau.safont@citrix.com>
There are two issues that are worked around here:
- Because the function doesn't own the file descriptor, the channel
  couldn't be closed. When this was used on a socket, it could have been
  closed and forced an error on the flush, never releasing the memory
- Because the channel is kept alive, and poiting to an FD, reusing the
  FD will lead to writing data to an unrelated file / socket

Duplicating the file descriptor allows the function to control the whole
life-cycle of the underlying FD and be able to close it, triggering it
to be GC'd

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
There was no int64 function before, and float were handled in two
different ways: turning them into string with 2 decimals places, or
using a conversion function that handles NaN and infinities, now all
floats are treated with the latter one.

All numbers, like before, are serialized as strings to ensure the
clients treat them consistently

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
The ad-hoc generator was not generating valid JSON

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
The comparison logic of non-normal float numbers was upstreamed years
ago, the code can now use it straight away.

Also added the values to the fring comparator to more easily see all the
values being compared when there's a failure

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
Instead raise the semantically correct No_RRA_available.

There's one last List.hd in the code, but it's correctly guarded so it
cannot ever be used with an empty list.

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
…a7c07e997c7'

Also move *.opam files to root, update dune install/uninstall rules and quality gate.

git-subtree-dir: ocaml/libs/xapi-rrd
git-subtree-mainline: da5059d
git-subtree-split: 7e7e838
Signed-off-by: Edwin Török <edwin.torok@cloud.com>
@psafont psafont merged commit 1671c17 into xapi-project:master Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants