Re: [PATCH 9/9]: virt-manager: add sparcline to vm/connection overview

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

 



Guido Günther wrote:
> Finally display a combined sparcline for rx & tx (network) and input &
> output (disk) in the Network I/O and Disk I/O columns in the vm machine
> overview.
>  -- Guido
> 
> diff -r 134368ad3def src/virtManager/connection.py
> --- a/src/virtManager/connection.py	Sat Oct 04 17:04:56 2008 +0200
> +++ b/src/virtManager/connection.py	Sat Oct 04 17:27:01 2008 +0200
> @@ -1056,6 +1056,14 @@
>  
>      def disk_io_rate(self):
>          return self.disk_read_rate() + self.disk_write_rate()
> +       
> +    def disk_io_vector_limit(self, dummy):
> +        """No point to accumulate unnormalized I/O for a conenction"""
> +        return [ 0.0 ]
> +
> +    def network_traffic_vector_limit(self, dummy):
> +        """No point to accumulate unnormalized Rx/Tx for a conenction"""
> +        return [ 0.0 ]
>  
>      def uuidstr(self, rawuuid):
>          hex = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f']
> diff -r 134368ad3def src/virtManager/domain.py
> --- a/src/virtManager/domain.py	Sat Oct 04 17:04:56 2008 +0200
> +++ b/src/virtManager/domain.py	Sat Oct 04 17:27:01 2008 +0200
> @@ -422,6 +422,14 @@
>                  vector.append(0)
>          return vector
>  
> +    def in_out_vector_limit(self, data, limit):
> +        l = len(data)/2
> +        end = [l, limit][l > limit]
> +        if l > limit:
> +            data = data[0:end] + data[l:l+end]

This piece here was giving me some trouble. If we
shrink data here, then the line below will try to
grab an out of bound index.

> +        d = map(lambda x,y: (x + y)/2, data[0:end], data[l:l+end]) 

Maybe this should be ... data[0:end], data[end:end*2] or
similar.

Also, the scaling problems with the disk polling can be
_really_ bad (though it's no fault of the code). If I have
polling going once a second, and single guest running with
six disks and a nic, the UI is completely locked up.

So I'd like to hold off on committing the actual polling
work until we put the gconf values in to disable this. It
doesn't even need to wired up to the gui for now, I can
do that after this its committed if you'd like (the prefs
dialog needs an overhaul anyways, but that can come after).

Thanks,
Cole

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux