Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pmtool
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
0
Merge Requests
0
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
EYRAUD-DUBOIS Lionel
pmtool
Commits
f1666db4
Commit
f1666db4
authored
Feb 14, 2019
by
EYRAUD-DUBOIS Lionel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More precise time measurements
parent
0e3b5d67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
pmtool.cpp
pmtool.cpp
+10
-10
No files found.
pmtool.cpp
View file @
f1666db4
...
@@ -66,8 +66,8 @@ void computeAlg(ProgramOptions& progOpt, Instance* ins,
...
@@ -66,8 +66,8 @@ void computeAlg(ProgramOptions& progOpt, Instance* ins,
try
{
try
{
result
->
makespan
=
alg
->
compute
(
*
ins
,
&
seq
);
result
->
makespan
=
alg
->
compute
(
*
ins
,
&
seq
);
auto
time
=
chrono
::
duration_cast
<
chrono
::
mi
lli
seconds
>
(
chrono
::
steady_clock
::
now
()
-
start
);
auto
time
=
chrono
::
duration_cast
<
chrono
::
mi
cro
seconds
>
(
chrono
::
steady_clock
::
now
()
-
start
);
result
->
milliseconds
=
time
.
count
();
result
->
milliseconds
=
time
.
count
()
/
1000.0
;
//cout << input_file << " " << name << " " << result << " " << time.count();
//cout << input_file << " " << name << " " << result << " " << time.count();
...
@@ -83,9 +83,9 @@ void computeAlg(ProgramOptions& progOpt, Instance* ins,
...
@@ -83,9 +83,9 @@ void computeAlg(ProgramOptions& progOpt, Instance* ins,
}
catch
(
int
e
)
{
}
catch
(
int
e
)
{
auto
time
=
chrono
::
duration_cast
<
chrono
::
mi
lli
seconds
>
(
chrono
::
steady_clock
::
now
()
-
start
);
auto
time
=
chrono
::
duration_cast
<
chrono
::
mi
cro
seconds
>
(
chrono
::
steady_clock
::
now
()
-
start
);
result
->
makespan
=
-
1
;
result
->
makespan
=
-
1
;
result
->
milliseconds
=
time
.
count
();
result
->
milliseconds
=
time
.
count
()
/
1000.0
;
}
}
if
(
localExport
)
free
(
localExport
);
if
(
localExport
)
free
(
localExport
);
...
@@ -269,9 +269,9 @@ int main(int argc, char** argv) {
...
@@ -269,9 +269,9 @@ int main(int argc, char** argv) {
if
(
progOpt
.
mergeTolerance
>
0
)
{
if
(
progOpt
.
mergeTolerance
>
0
)
{
instance
->
autoMerge
(
progOpt
.
mergeTolerance
);
instance
->
autoMerge
(
progOpt
.
mergeTolerance
);
}
}
auto
time
=
chrono
::
duration_cast
<
chrono
::
mi
lli
seconds
>
(
chrono
::
steady_clock
::
now
()
-
start
);
auto
time
=
chrono
::
duration_cast
<
chrono
::
mi
cro
seconds
>
(
chrono
::
steady_clock
::
now
()
-
start
);
if
(
progOpt
.
verbosity
>=
4
)
if
(
progOpt
.
verbosity
>=
4
)
cerr
<<
" done ("
<<
time
.
count
()
<<
" ms)."
<<
endl
;
cerr
<<
" done ("
<<
time
.
count
()
/
1000.0
<<
" ms)."
<<
endl
;
instance
->
display
(
progOpt
.
verbosity
);
instance
->
display
(
progOpt
.
verbosity
);
double
bestBoundValue
=
0
;
double
bestBoundValue
=
0
;
...
@@ -289,15 +289,15 @@ int main(int argc, char** argv) {
...
@@ -289,15 +289,15 @@ int main(int argc, char** argv) {
bestBoundValue
=
result
;
bestBoundValue
=
result
;
bestBound
=
&
(
*
it
);
bestBound
=
&
(
*
it
);
}
}
auto
time
=
chrono
::
duration_cast
<
chrono
::
mi
lli
seconds
>
(
chrono
::
steady_clock
::
now
()
-
start
);
auto
time
=
chrono
::
duration_cast
<
chrono
::
mi
cro
seconds
>
(
chrono
::
steady_clock
::
now
()
-
start
);
// auto duration =
// auto duration =
cout
<<
input_file
<<
" "
<<
(
instance
->
platformFile
!=
""
?
instance
->
platformFile
:
"NA"
);
cout
<<
input_file
<<
" "
<<
(
instance
->
platformFile
!=
""
?
instance
->
platformFile
:
"NA"
);
cout
<<
" True "
<<
name
<<
" "
<<
result
<<
" "
<<
time
.
count
();
cout
<<
" True "
<<
name
<<
" "
<<
result
<<
" "
<<
time
.
count
()
/
1000.0
;
}
catch
(
int
e
)
{
}
catch
(
int
e
)
{
auto
time
=
chrono
::
duration_cast
<
chrono
::
mi
lli
seconds
>
(
chrono
::
steady_clock
::
now
()
-
start
);
auto
time
=
chrono
::
duration_cast
<
chrono
::
mi
cro
seconds
>
(
chrono
::
steady_clock
::
now
()
-
start
);
cout
<<
input_file
<<
" "
<<
(
instance
->
platformFile
!=
""
?
instance
->
platformFile
:
"NA"
);
cout
<<
input_file
<<
" "
<<
(
instance
->
platformFile
!=
""
?
instance
->
platformFile
:
"NA"
);
cout
<<
" True "
<<
name
<<
" "
<<
"NA"
<<
" "
<<
cout
<<
" True "
<<
name
<<
" "
<<
"NA"
<<
" "
<<
time
.
count
();
time
.
count
()
/
1000.0
;
}
}
if
(
progOpt
.
repartitionFile
!=
""
)
{
if
(
progOpt
.
repartitionFile
!=
""
)
{
...
...
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