Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
alta
alta
Commits
0df740d7
Commit
0df740d7
authored
Feb 28, 2017
by
Romain Pacanowski
Browse files
added timer to measure time when loading and saving data
parent
d9cb5e2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
sources/softs/data2data/main.cpp
View file @
0df740d7
...
...
@@ -145,7 +145,13 @@ int main(int argc, char** argv)
try
{
alta
::
timer
load_timer
;
load_timer
.
start
();
d_in
=
plugins_manager
::
load_data
(
args
[
"input"
],
args
[
"in-data"
],
args
)
;
load_timer
.
stop
();
std
::
cout
<<
"<<INFO>> Data Loaded in "
<<
load_timer
<<
std
::
endl
;
}
CATCH_FILE_IO_ERROR
(
args
[
"input"
]);
...
...
@@ -154,6 +160,7 @@ int main(int argc, char** argv)
std
::
cout
<<
"<<INFO>> Input data will be treated as ALTA format"
<<
std
::
endl
;
}
ptr
<
data
>
d_out
=
plugins_manager
::
get_data
(
args
[
"out-data"
],
d_in
->
size
(),
compute_parameters
(
*
d_in
,
args
),
...
...
@@ -188,6 +195,9 @@ int main(int argc, char** argv)
std
::
cout
<<
"<<DEBUG>> d_out->parametrization().input_parametrization(), = "
<<
params
::
get_name
(
d_out
->
parametrization
().
input_parametrization
()
)
<<
std
::
endl
;
std
::
cout
<<
"<<DEBUG>> d_out->parametrization().output_parametrization() = "
<<
params
::
get_name
(
d_out
->
parametrization
().
output_parametrization
()
)
<<
std
::
endl
;
}
alta
::
timer
save_timer
;
save_timer
.
start
();
unsigned
int
nb_invalid_configs
=
0
;
vec
temp
(
d_out
->
parametrization
().
dimX
()
+
d_out
->
parametrization
().
dimY
());
...
...
@@ -232,12 +242,15 @@ int main(int argc, char** argv)
d_out
->
set
(
i
,
temp
);
}
}
save_timer
.
stop
();
if
(
nb_invalid_configs
>
0
)
{
std
::
cout
<<
"<<INFO>> Number of Invalid Configurations = "
<<
nb_invalid_configs
<<
" over "
<<
d_in
->
size
()
<<
" configurations"
<<
std
::
endl
;
}
std
::
cout
<<
"<<INFO>> Data saved to file in "
<<
save_timer
<<
std
::
endl
;
}
else
{
...
...
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