After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 685900 - libvirt-machine: Only gather stats in running state
libvirt-machine: Only gather stats in running state
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-10-10 16:27 UTC by Zeeshan Ali
Modified: 2016-03-31 13:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libvirt-machine: Only gather stats in running state (1.90 KB, patch)
2012-10-10 16:27 UTC, Zeeshan Ali
committed Details | Review

Description Zeeshan Ali 2012-10-10 16:27:26 UTC
See patch and its log for details
Comment 1 Zeeshan Ali 2012-10-10 16:27:29 UTC
Created attachment 226186 [details] [review]
libvirt-machine: Only gather stats in running state

There is no need to keep querying libvirt for stats/info on domain if
domain is not running. Doing so only wastes host resources and even
result in console getting spammed with warnings when host is under heavy
load.
Comment 2 Marc-Andre Lureau 2012-10-11 06:44:57 UTC
Review of attachment 226186 [details] [review]:

::: src/libvirt-machine.vala
@@ +90,3 @@
             case DomainState.BLOCKED:
                 state = MachineState.RUNNING;
+                set_stats_enable (true);

is this call necessary, since the notify["state"] handler does the same?
Comment 3 Zeeshan Ali 2012-10-11 12:13:19 UTC
(In reply to comment #2)
> Review of attachment 226186 [details] [review]:
> 
> ::: src/libvirt-machine.vala
> @@ +90,3 @@
>              case DomainState.BLOCKED:
>                  state = MachineState.RUNNING;
> +                set_stats_enable (true);
> 
> is this call necessary, since the notify["state"] handler does the same?

It would be redundant if notify was getting connected before this switch.
Comment 4 Zeeshan Ali 2012-10-13 02:30:34 UTC
So shall I push this before 3.6.1?
Comment 5 Alexander Larsson 2012-10-15 12:43:26 UTC
Review of attachment 226186 [details] [review]:

ack
Comment 6 Zeeshan Ali 2012-10-15 12:48:07 UTC
Attachment 226186 [details] pushed as f2bdae3 - libvirt-machine: Only gather stats in running state