Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
duniter
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
Container Registry
Model registry
Monitor
Service Desk
Analyze
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
nodes
typescript
duniter
Merge requests
!1216
[enh] Ecomode improvements
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
[enh] Ecomode improvements
reduce_cpu_improvements
into
reduce_cpu
Overview
2
Commits
3
Pipelines
0
Changes
4
Merged
Cédric Moreau
requested to merge
reduce_cpu_improvements
into
reduce_cpu
7 years ago
Overview
2
Commits
3
Pipelines
0
Changes
4
Expand
Several changes for the ecomode MR:
!1214 (closed)
Edited
7 years ago
by
Cédric Moreau
1
0
Merge request reports
Compare
reduce_cpu
version 1
42ca7a5a
7 years ago
reduce_cpu (base)
and
latest version
latest version
93c5b747
3 commits,
7 years ago
version 1
42ca7a5a
1 commit,
7 years ago
4 files
+
34
−
28
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
app/modules/prover/lib/blockProver.ts
+
2
−
2
Options
@@ -201,12 +201,12 @@ export class BlockProver {
this
.
logger
.
info
(
'
Done: #%s, %s in %ss instead of %ss (%s tests, ~%s tests/s)
'
,
block
.
number
,
proof
.
hash
,
(
duration
/
1000
).
toFixed
(
2
),
this
.
conf
.
avgGenTime
,
testsCount
,
testsPerSecond
.
toFixed
(
2
));
this
.
logger
.
info
(
'
FOUND proof-of-work with %s leading zeros followed by [0-
'
+
highMark
+
'
]!
'
,
nbZeros
);
if
(
this
.
conf
.
ecoMode
===
true
&&
this
.
conf
.
nbCores
*
testsPerSecond
>
300
)
{
if
(
this
.
conf
.
ecoMode
===
true
&&
this
.
conf
.
nbCores
*
testsPerSecond
>
ProverConstants
.
ECO_MODE_MINIMAL_TESTS_PER_SECONDS
)
{
if
(
this
.
conf
.
nbCores
>
1
)
{
this
.
logger
.
info
(
"
Reducing number of CPU cores
"
+
this
.
conf
.
nbCores
)
this
.
conf
.
nbCores
=
this
.
conf
.
nbCores
-
1
}
else
if
(
this
.
conf
.
cpu
>
0.19
){
else
if
(
this
.
conf
.
cpu
>
ProverConstants
.
ECO_MODE_MINIMAL_CPU
){
let
cpu
:
number
=
this
.
conf
.
cpu
-
0.1
this
.
logger
.
info
(
"
Slowing down the CPU to
"
+
cpu
)
this
.
changeCPU
(
cpu
)
Loading