Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
isochrone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Institut für Informatik
dbis
dbis-isochrone
isochrone
Commits
ed612273
Commit
ed612273
authored
11 years ago
by
Nikolaus Krismer
Browse files
Options
Downloads
Patches
Plain Diff
changed runtimes...
...new values create smoother graphs
parent
2dc9aead
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/it/unibz/inf/isochrone/network/RuntimeComplex.java
+23
-19
23 additions, 19 deletions
...t/java/it/unibz/inf/isochrone/network/RuntimeComplex.java
with
23 additions
and
19 deletions
src/test/java/it/unibz/inf/isochrone/network/RuntimeComplex.java
+
23
−
19
View file @
ed612273
...
...
@@ -45,19 +45,24 @@ public final class RuntimeComplex {
private
static
final
Calendar
ST_TIME
=
new
GregorianCalendar
(
2010
,
6
,
14
,
10
,
30
,
0
);
private
static
final
int
IT_NODE_ID
=
21
;
private
static
final
Calendar
IT_TIME
=
new
GregorianCalendar
(
2011
,
9
,
20
,
15
,
0
,
0
);
private
static
final
String
XML_RUNTIME
=
"build/reports/tests/algorithm-runtimes.xml"
;
private
static
final
String
RESULTFILE_XML_RUNTIME
=
"build/reports/tests/algorithm-runtimes.xml"
;
private
static
final
int
MAX_RUNTIME
=
18000
;
// 5 hours;
private
static
final
int
RUNTIME_POINTS_PER_OFFSET
=
12
;
private
static
final
int
[]
RUNTIME_OFFSETS
=
{
60
,
// 1 minute (in sec)
3600
,
// 1 hour (in sec)
86400
// 1 day (in sec)
};
private
static
Map
<
Integer
,
TestParameters
>
datasets
=
new
TreeMap
<>();
private
static
Map
<
String
,
Map
<
String
,
Long
>>
runtimes
=
new
HashMap
<>();
// launcher for visualVM
public
static
void
main
(
final
String
[]
args
)
{
final
RuntimeComplex
o
=
new
RuntimeComplex
();
// addDatasets();
// add
All
Datasets();
final
Set
<
Integer
>
times
=
new
HashSet
<>();
// CHECKSTYLE:OFF MagicNumber
times
.
add
(
7200
);
// CHECKSTYLE:ON MagicNumber
times
.
add
(
MAX_RUNTIME
);
addDatasetBZ
(
times
);
System
.
out
.
println
(
"Starting profiling:"
);
...
...
@@ -79,11 +84,11 @@ public final class RuntimeComplex {
@AfterClass
public
static
void
writeRuntimeXML
()
{
final
Set
<
Entry
<
String
,
Map
<
String
,
Long
>>>
resultSet
=
runtimes
.
entrySet
();
writeMapToXML
(
new
File
(
XML_RUNTIME
),
resultSet
,
REPEAT_COUNT
);
writeMapToXML
(
new
File
(
RESULTFILE_
XML_RUNTIME
),
resultSet
,
REPEAT_COUNT
);
}
@BeforeClass
public
static
void
addDatasets
()
{
public
static
void
add
All
Datasets
()
{
final
Set
<
Integer
>
times
=
getTimeSet
();
addDatasetBZ
(
times
);
// addDatasetIT(times);
...
...
@@ -141,18 +146,17 @@ public final class RuntimeComplex {
private
static
Set
<
Integer
>
getTimeSet
()
{
final
Set
<
Integer
>
times
=
new
TreeSet
<
Integer
>();
// CHECKSTYLE:OFF MagicNumber
times
.
add
(
60
);
// 1 minute
times
.
add
(
120
);
// 2 minutes
times
.
add
(
240
);
// 4 minutes
times
.
add
(
480
);
// 8 minutes
times
.
add
(
900
);
// 15 minutes
times
.
add
(
1800
);
// 30 minutes
times
.
add
(
3600
);
// 1 hour
times
.
add
(
7200
);
// 2 hours
times
.
add
(
14400
);
// 4 hours
times
.
add
(
48000
);
// 8 hours
// CHECKSTYLE:ON MagicNumber
for
(
int
offset
:
RUNTIME_OFFSETS
)
{
int
stepWidth
=
(
offset
/
RUNTIME_POINTS_PER_OFFSET
);
for
(
int
i
=
stepWidth
;
i
<
offset
;
i
+=
stepWidth
)
{
int
runtime
=
Math
.
max
(
offset
,
offset
*
i
);
if
(
runtime
>
MAX_RUNTIME
)
{
return
times
;
}
times
.
add
(
runtime
);
}
}
return
times
;
}
...
...
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