Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Tobias Langer
/
experiment
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
881c4ad4
authored
Oct 11, 2016
by
Tobias Langer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed problem with wrong timestamp. Now timestamps are printed relative to task start.
parent
dfae4598
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
templates/normal/experiment.cpp
+8
-8
No files found.
templates/normal/experiment.cpp
View file @
881c4ad4
...
...
@@ -34,8 +34,8 @@ auto calculate_hyperperiod() -> long long
}
struct
timestamps
{
base_clock
::
time_point
start
;
base_clock
::
time_point
end
;
cpp_time_base
::
duration
start
;
cpp_time_base
::
duration
end
;
int
core_id
=
0
;
};
...
...
@@ -59,12 +59,12 @@ void benchmark_out()
std
::
cout
<<
"executions "
<<
taskset
[
i
].
count
<<
std
::
endl
;
for
(
int
j
=
0
;
j
<
benchmark
[
i
].
size
();
j
++
)
{
auto
start
=
base_clock
::
to_time_t
(
benchmark
[
i
][
j
].
start
);
auto
end
=
base_clock
::
to_time_t
(
benchmark
[
i
][
j
].
end
);
auto
task_start
=
benchmark
[
i
][
j
].
start
.
count
(
);
auto
task_end
=
benchmark
[
i
][
j
].
end
.
count
(
);
auto
core_id
=
benchmark
[
i
][
j
].
core_id
;
std
::
cout
<<
"instance "
<<
j
<<
" "
;
std
::
cout
<<
"start "
<<
start
<<
" "
;
std
::
cout
<<
"end "
<<
end
<<
" "
;
std
::
cout
<<
"start "
<<
task_
start
<<
" "
;
std
::
cout
<<
"end "
<<
end
_task
<<
" "
;
std
::
cout
<<
"core_id "
<<
core_id
<<
std
::
endl
;
}
}
...
...
@@ -112,8 +112,8 @@ static void IdleTask(const void* args, mtapi_size_t, void*, mtapi_size_t,
auto
end_time
=
base_clock
::
now
();
int
core_id
=
sched_getcpu
();
benchmark
[
task_id
][
task_num
-
1
].
start
=
start_time
;
benchmark
[
task_id
][
task_num
-
1
].
end
=
end_time
;
benchmark
[
task_id
][
task_num
-
1
].
start
=
duration_cast
<
cpp_base_time
>
(
start_time
-
start
)
;
benchmark
[
task_id
][
task_num
-
1
].
end
=
duration_cast
<
cpp_base_time
>
(
end_time
-
start
)
;
benchmark
[
task_id
][
task_num
-
1
].
core_id
=
core_id
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment