[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH V4 1/5] Add new public API virDomainGetCPUStats()



On Sat, Jan 28, 2012 at 07:37:49AM -0700, Eric Blake wrote:
> [I see you cc'd Eric redhat com; unfortunately, that doesn't forward to
> me - at least I saw it on-list :) ]
> 
> On 01/27/2012 11:20 PM, KAMEZAWA Hiroyuki wrote:
> > 
> > add new API virDomainGetCPUStats() for getting cpu accounting information
> > per real cpus which is used by a domain.
> > 
> 
> > +++ b/include/libvirt/libvirt.h.in
> > @@ -3797,6 +3797,12 @@ int virConnectSetKeepAlive(virConnectPtr conn,
> >                             int interval,
> >                             unsigned int count);
> >  
> > +int virDomainGetCPUStats(virDomainPtr domain,
> > +                         virTypedParameterPtr params,
> > +                         unsigned int nparams,
> > +                         int start_cpu,
> > +                         unsigned int ncpus,
> > +                         unsigned int flags);
> >  #ifdef __cplusplus
> 
> Phooey - I didn't notice this earlier, but we like new API to occur in
> context (all the virDomain calls in sequence), and not slammed at the
> bottom of the file (where we sunk the deprecated interfaces).

To be honest, even before this, the libvirt.h header file was a horrible
disorganized mess, and has been for a very long time. Over 4 years ago
now I suggested splitting it up based on functional area, such that the
top level libvirt.h that apps include, just #includes further sub-headers

https://www.redhat.com/archives/libvir-list/2007-October/msg00255.html

The benefits of doing this today would be even greater than back then...

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]