Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pmt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
ResearchAndDevelopment
pmt
Commits
155e09b2
Commit
155e09b2
authored
1 year ago
by
Stefano Corda
Browse files
Options
Downloads
Patches
Plain Diff
set 100ms interval and cleanup
parent
709d7e4a
No related branches found
No related tags found
1 merge request
!26
Fixed interval Rapl
Pipeline
#54101
passed
1 year ago
Stage: build
Stage: test
Stage: linting
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
rapl/RaplImpl.cpp
+1
-33
1 addition, 33 deletions
rapl/RaplImpl.cpp
rapl/RaplImpl.h
+0
-1
0 additions, 1 deletion
rapl/RaplImpl.h
with
1 addition
and
34 deletions
rapl/RaplImpl.cpp
+
1
−
33
View file @
155e09b2
...
@@ -186,8 +186,7 @@ void RaplImpl::Init() {
...
@@ -186,8 +186,7 @@ void RaplImpl::Init() {
uj_total_
[
i
]
=
0
;
uj_total_
[
i
]
=
0
;
}
}
measurement_interval_
=
500
;
measurement_interval_
=
100
;
// SetMeasurementInterval();
}
}
void
RaplImpl
::
StartThread
()
{
void
RaplImpl
::
StartThread
()
{
...
@@ -269,35 +268,4 @@ std::vector<RaplMeasurement> RaplImpl::GetMeasurements() {
...
@@ -269,35 +268,4 @@ std::vector<RaplMeasurement> RaplImpl::GetMeasurements() {
return
measurements
;
return
measurements
;
}
// end Rapl::measure
}
// end Rapl::measure
void
RaplImpl
::
SetMeasurementInterval
()
{
const
int
measurement_interval_min
=
10
;
// ms
const
int
measurement_interval_max
=
1000
;
// ms
if
(
file_names_
.
size
()
==
0
)
{
measurement_interval_
=
measurement_interval_max
;
return
;
}
const
std
::
string
filename
=
file_names_
[
0
];
int
measurement_interval
=
measurement_interval_min
;
for
(;
measurement_interval
<
measurement_interval_max
;
measurement_interval
+=
measurement_interval_min
)
{
size_t
value1
=
0
;
size_t
value2
=
0
;
ReadFile
(
filename
,
value1
);
ReadFile
(
filename
,
value2
);
if
(
value1
!=
value2
)
{
break
;
}
};
const
int
multiple
=
10
;
measurement_interval_
=
((
measurement_interval
+
multiple
)
/
multiple
)
*
multiple
;
#if defined(DEBUG)
std
::
cout
<<
"Measurement interval: "
<<
measurement_interval_
<<
"ms
\n
"
;
#endif
}
}
// namespace pmt::rapl
}
// namespace pmt::rapl
This diff is collapsed.
Click to expand it.
rapl/RaplImpl.h
+
0
−
1
View file @
155e09b2
...
@@ -41,7 +41,6 @@ public:
...
@@ -41,7 +41,6 @@ public:
private
:
private
:
std
::
vector
<
int
>
DetectPackages
();
std
::
vector
<
int
>
DetectPackages
();
void
Init
();
void
Init
();
void
SetMeasurementInterval
();
void
StartThread
();
void
StartThread
();
void
StopThread
();
void
StopThread
();
RaplState
GetRaplState
();
RaplState
GetRaplState
();
...
...
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