package xapi-rrd
RRD library for use with xapi
Install
Dune Dependency
Authors
Maintainers
Sources
xapi-rrd-1.9.1.tbz
sha256=1d4288625e3f158dbd3cb853fb00b3fad7776751bd3fe984aa5b1d3f9d04a952
sha512=d6727675f0904ea48cc4e8bd53e957785e14f87939691061110d27789372089ae98e61865b281731f19dfdc427fefa977a04cdb026a5588fc7fd105ae568c297
doc/src/xapi-rrd.unix/rrd_unix.ml.html
Source file rrd_unix.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
(* * Copyright (C) 2006-2009 Citrix Systems Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; version 2.1 only. with the special * exception on linking described in file LICENSE. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. *) (* * RRD Unix module * This module provides Unix tools for dealing with RRDs *) (** * @group Performance Monitoring *) let finally = Xapi_stdext_pervasives.Pervasiveext.finally let with_out_channel_output fd f = let oc = Unix.out_channel_of_descr fd in finally (fun () -> let output = Xmlm.make_output (`Channel oc) in f output ) (fun () -> flush oc) let xml_to_fd rrd fd = with_out_channel_output fd (Rrd.xml_to_output rrd) let json_to_fd rrd fd = let payload = Rrd.json_to_string rrd |> Bytes.unsafe_of_string in let len = Bytes.length payload in Unix.write fd payload 0 len |> ignore let to_fd ?(json = false) rrd fd = (if json then json_to_fd else xml_to_fd) rrd fd
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>