-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add not-in-use computing prefs #4871
Conversation
niu_cpu_usage_limit: CPU throttling while computer not in use niu_max_ncpus_pct: # CPUs to use while computer not in use niu_suspend_cpu_usage: suspend if non-BOINC usage while computer not in use Client: parse these from global_prefs files, and enforce them. If not specified, use the corresponding (non-niu) pref all the time. Web: add them to the computing prefs pages. Refactor the prefs into: in use / not in use / tasks / disk / network TODO: update the Manager prefs dialog accordingly
use the values from corresponding in-use pref
Note: the Manager code is written in a clunky way. I cleaned up one instance. TODO: clean up others.
clientgui/DlgAdvPreferencesBase.cpp
Outdated
suspendComputingStaticBox, ID_DEFAULT, | ||
_("Suspend when no mouse/keyboard input in last"), | ||
// CPU throttling | ||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Precede line 375 with /*xgettext:no-c-format*/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidpanderson You have not fixed this. For an explanation why this is needed, see here and here.
(Of course the /*xgettext:no-c-format*/
directive must now precede line 376 in the latest version of this file.)
On Windows it's failing on this:
On linux it's failing on:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AenBleidd This is a substantial amount of added and changed code. I will try to review this within the next week.
@CharlieFenton, I completely agree with you. I don't push you to make it just immediately. But this change is quite significant so I believe your review is essential. |
It would reassure me while testing if the scheduler at SETI@home (or another project with the provisional web selection tools) could be re-activated so that I can test the automatic propagation of global preferences from project to project (propagation considers the time and project of the most recent update). |
I fixed the compile error. Oddly, it wasn't an error in VS |
I fixed the sim build error |
Codecov Report
@@ Coverage Diff @@
## master #4871 +/- ##
============================================
- Coverage 10.43% 10.42% -0.02%
Complexity 1046 1046
============================================
Files 278 278
Lines 35827 35864 +37
Branches 8113 8127 +14
============================================
Hits 3739 3739
- Misses 31717 31754 +37
Partials 371 371
|
This eliminates ambiguity between "no limit" and "inherit from in use"
I changed the web code to fix 1 and (I think) 5. 6 doesn't happen. When the client gets prefs from a project, 7: the dialog is now 644 pixels high on Win. That's short enough. 9: the web form says "Requires BOINC 7.20.3+" 10: works AFAIK |
- replace code lost from commit 27aff32 - restore previous values from global_prefs.xml or global_prefs_override.xml
@davidpanderson I have confirmed you have fixed all the items on my list (except [6] which probably has no solution. I found a couple of additional problems, but I have fixed them in the code myself. (For some reason, a couple of the changes you made in commit 27aff32 were lost; I replaced them.) Regarding item 6, you wrote:
I'm sorry if I was not clear. I was referring only to changes on a project web site, so the propagation happens via global_prefs.xml. I agree that updating the client transfers the updated web prefs to global_prefs.xml, which is in effect updating it. When you then update another project, that project's web prefs receive the updated data from global_prefs.xml. The scenario I asked about was when a user is running BOINC 7.20.2 or earlier, which does not save the not-in-use prefs from the first project in global_prefs.xml. As a result, the second project does not receive the not-in-use prefs and sets them to the in-use prefs (the default.) This scenario does not involve global_prefs_override.xml at all; the customizing I mentioned is done entirely on project websites. But, as I wrote earlier, I suspect there is no fix for this and it is not critical. |
Code looks ok to me. I still would like to check it in a week when I'll have access to the linux laptop with 768 pixels height just to see how new Preferences windows looks like on it, then we could probably close the corresponding ticket as well. |
@davidpanderson Please remember to update the documentation, and add the missing description of Suspend when no mouse/keyboard input in last xx minutes . |
I added the "no input in X min" to the mediawiki page |
I suggest to go ahead and merge this, and fix the size issue later in the corresponding ticket instead #1872 |
I agree. |
Likewise. I agree. |
On Linux can you drag the dialog to make the bottom visible? |
No. The window is already on its top most position. |
As discussed, I'm merging it now. |
Fixes #41 (!)
Previously there were single prefs for
These applied whether or not the computer was in use.
This PR adds separate prefs for when the computer is not in use.
It includes both web-based and Manager interfaces for editing them.
Backwards compatible; if the new prefs are not specified, it uses the old ones for both cases.