Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kieker-TeeTime-Stages
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeeTime
Kieker-TeeTime-Stages
Commits
65db0cfa
Commit
65db0cfa
authored
8 years ago
by
Sören Henning
Browse files
Options
Downloads
Patches
Plain Diff
fixed
#39
parent
9f0a5f6a
No related branches found
No related tags found
1 merge request
!19
Trace aggr analysis
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/kieker/analysis/util/graph/export/dot/DotElementExporter.java
+20
-12
20 additions, 12 deletions
...er/analysis/util/graph/export/dot/DotElementExporter.java
with
20 additions
and
12 deletions
src/main/java/kieker/analysis/util/graph/export/dot/DotElementExporter.java
+
20
−
12
View file @
65db0cfa
package
kieker.analysis.util.graph.export.dot
;
package
kieker.analysis.util.graph.export.dot
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.Map.Entry
;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
kieker.analysis.util.graph.Direction
;
import
kieker.analysis.util.graph.Direction
;
import
kieker.analysis.util.graph.Edge
;
import
kieker.analysis.util.graph.Edge
;
...
@@ -13,6 +13,8 @@ import kieker.analysis.util.graph.Vertex;
...
@@ -13,6 +13,8 @@ import kieker.analysis.util.graph.Vertex;
import
kieker.analysis.util.graph.export.AbstractTransformer
;
import
kieker.analysis.util.graph.export.AbstractTransformer
;
import
kieker.analysis.util.graph.util.dot.DotGraphWriter
;
import
kieker.analysis.util.graph.util.dot.DotGraphWriter
;
import
kieker.analysis.util.graph.util.dot.attributes.DotClusterAttribute
;
import
kieker.analysis.util.graph.util.dot.attributes.DotClusterAttribute
;
import
kieker.analysis.util.graph.util.dot.attributes.DotEdgeAttribute
;
import
kieker.analysis.util.graph.util.dot.attributes.DotNodeAttribute
;
class
DotElementExporter
extends
AbstractTransformer
<
Void
>
{
class
DotElementExporter
extends
AbstractTransformer
<
Void
>
{
...
@@ -42,7 +44,7 @@ class DotElementExporter extends AbstractTransformer<Void> {
...
@@ -42,7 +44,7 @@ class DotElementExporter extends AbstractTransformer<Void> {
dotGraphWriter
.
addClusterStop
();
dotGraphWriter
.
addClusterStop
();
}
else
{
}
else
{
//
dotGraphWriter.addNode(vertex.getId().toString(), getAttributes(vertex));
dotGraphWriter
.
addNode
(
vertex
.
getId
().
toString
(),
getAttributes
(
vertex
));
}
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
handleIOException
(
e
);
handleIOException
(
e
);
...
@@ -67,19 +69,25 @@ class DotElementExporter extends AbstractTransformer<Void> {
...
@@ -67,19 +69,25 @@ class DotElementExporter extends AbstractTransformer<Void> {
}
}
protected
Map
<
String
,
String
>
getAttributes
(
final
Edge
edge
)
{
protected
Map
<
String
,
String
>
getAttributes
(
final
Edge
edge
)
{
// System.out.println("Hi!" + configuration.getEdgeAttributes().entrySet().stream().collect(Collectors.toMap(
final
Map
<
String
,
String
>
attributes
=
new
HashMap
<>();
// e -> e.getKey().toString(),
for
(
Entry
<
DotEdgeAttribute
,
Function
<
Edge
,
String
>>
entry
:
configuration
.
getEdgeAttributes
().
entrySet
())
{
// e -> null)));
final
String
value
=
entry
.
getValue
().
apply
(
edge
);
// return null; // TODO temp
if
(
value
!=
null
)
{
return
configuration
.
getEdgeAttributes
().
entrySet
().
stream
().
collect
(
Collectors
.
toMap
(
attributes
.
put
(
entry
.
getKey
().
toString
(),
value
);
e
->
e
.
getKey
().
toString
(),
}
e
->
e
.
getValue
().
apply
(
edge
)));
}
return
attributes
;
}
}
protected
Map
<
String
,
String
>
getAttributes
(
final
Vertex
vertex
)
{
protected
Map
<
String
,
String
>
getAttributes
(
final
Vertex
vertex
)
{
return
configuration
.
getNodeAttributes
().
entrySet
().
stream
().
collect
(
Collectors
.
toMap
(
final
Map
<
String
,
String
>
attributes
=
new
HashMap
<>();
e
->
e
.
getKey
().
toString
(),
for
(
Entry
<
DotNodeAttribute
,
Function
<
Vertex
,
String
>>
entry
:
configuration
.
getNodeAttributes
().
entrySet
())
{
e
->
e
.
getValue
().
apply
(
vertex
)));
final
String
value
=
entry
.
getValue
().
apply
(
vertex
);
if
(
value
!=
null
)
{
attributes
.
put
(
entry
.
getKey
().
toString
(),
value
);
}
}
return
attributes
;
}
}
@Override
@Override
...
...
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