Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
boinc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
einsteinathome
boinc
Commits
ad32ed3e
Commit
ad32ed3e
authored
10 years ago
by
Rom Walton
Browse files
Options
Downloads
Patches
Plain Diff
VBOX: Switch back to using elapsed time in determining checkpoint based timings.
parent
26e16ac4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
samples/vboxwrapper/vboxwrapper.cpp
+9
-9
9 additions, 9 deletions
samples/vboxwrapper/vboxwrapper.cpp
with
9 additions
and
9 deletions
samples/vboxwrapper/vboxwrapper.cpp
+
9
−
9
View file @
ad32ed3e
...
...
@@ -1041,12 +1041,6 @@ int main(int argc, char** argv) {
//
if
((
elapsed_time
-
last_status_report_time
)
>=
6000.0
)
{
last_status_report_time
=
elapsed_time
;
fprintf
(
stderr
,
"%s Status Report: CPU Time: '%f'
\n
"
,
vboxwrapper_msg_prefix
(
buf
,
sizeof
(
buf
)),
current_cpu_time
);
if
(
vm
.
job_duration
)
{
fprintf
(
stderr
,
...
...
@@ -1063,6 +1057,12 @@ int main(int argc, char** argv) {
elapsed_time
);
}
fprintf
(
stderr
,
"%s Status Report: CPU Time: '%f'
\n
"
,
vboxwrapper_msg_prefix
(
buf
,
sizeof
(
buf
)),
current_cpu_time
);
if
(
aid
.
global_prefs
.
daily_xfer_limit_mb
)
{
fprintf
(
stderr
,
...
...
@@ -1084,14 +1084,14 @@ int main(int argc, char** argv) {
if
(
boinc_time_to_checkpoint
())
{
// Only peform a VM checkpoint every ten minutes or so.
//
if
(
current_cpu
_time
>=
last_checkpoint_time
+
vm
.
minimum_checkpoint_interval
+
random_checkpoint_factor
)
{
if
(
elapsed
_time
>=
last_checkpoint_time
+
vm
.
minimum_checkpoint_interval
+
random_checkpoint_factor
)
{
// Basic interleave factor is only needed once.
if
(
random_checkpoint_factor
>
0
)
{
random_checkpoint_factor
=
0.0
;
}
// Checkpoint
retval
=
vm
.
createsnapshot
(
current_cpu
_time
);
retval
=
vm
.
createsnapshot
(
elapsed
_time
);
if
(
retval
)
{
// Let BOINC clean-up the environment which should release any file/mutex locks and then attempt
// to resume from a previous snapshot.
...
...
@@ -1107,7 +1107,7 @@ int main(int argc, char** argv) {
}
else
{
// tell BOINC we've successfully created a checkpoint.
//
last_checkpoint_time
=
current_cpu
_time
;
last_checkpoint_time
=
elapsed
_time
;
write_checkpoint
(
elapsed_time
,
current_cpu_time
,
vm
);
boinc_checkpoint_completed
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment