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
cb3e6b41
There was a problem fetching the pipeline summary.
Commit
cb3e6b41
authored
8 years ago
by
Sören Henning
Browse files
Options
Downloads
Patches
Plain Diff
worked on
#29
parent
206b4d17
No related branches found
No related tags found
3 merge requests
!17
Get impletemented stages and Java 8
,
!15
Trace aggr analysis
,
!14
worked on #29
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/kieker/analysis/graph/impl/GraphImpl.java
+29
-6
29 additions, 6 deletions
src/main/java/kieker/analysis/graph/impl/GraphImpl.java
with
29 additions
and
6 deletions
src/main/java/kieker/analysis/graph/impl/GraphImpl.java
+
29
−
6
View file @
cb3e6b41
...
...
@@ -3,6 +3,7 @@ package kieker.analysis.graph.impl;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Stack
;
import
kieker.analysis.graph.Direction
;
import
kieker.analysis.graph.Edge
;
...
...
@@ -18,8 +19,14 @@ public class GraphImpl extends ElementImpl implements Graph {
protected
Long
currentDefaultId
=
0
l
;
protected
VertexImpl
parentVertex
=
null
;
public
GraphImpl
()
{}
protected
GraphImpl
(
final
VertexImpl
parentVertex
)
{
this
.
parentVertex
=
parentVertex
;
}
@Override
public
Vertex
addVertex
(
final
Object
id
)
{
String
idString
=
null
;
...
...
@@ -71,6 +78,28 @@ public class GraphImpl extends ElementImpl implements Graph {
@Override
public
Edge
addEdge
(
final
Object
id
,
final
Vertex
outVertex
,
final
Vertex
inVertex
)
{
Stack
<
VertexImpl
>
outVertexParents
=
new
Stack
<>();
for
(
VertexImpl
parent
=
((
VertexImpl
)
outVertex
).
graph
.
parentVertex
;
parent
!=
null
;
parent
=
parent
.
graph
.
parentVertex
)
{
outVertexParents
.
push
(
parent
);
}
Stack
<
VertexImpl
>
inVertexParents
=
new
Stack
<>();
for
(
VertexImpl
parent
=
((
VertexImpl
)
inVertex
).
graph
.
parentVertex
;
parent
!=
null
;
parent
=
parent
.
graph
.
parentVertex
)
{
inVertexParents
.
push
(
parent
);
}
if
(
outVertexParents
.
pop
()
!=
inVertexParents
.
pop
())
{
// throw exception TODO
}
GraphImpl
firstEqualParent
=
this
;
while
(
outVertexParents
.
peek
()
==
inVertexParents
.
pop
())
{
firstEqualParent
=
outVertexParents
.
pop
().
graph
;
}
return
firstEqualParent
.
addEdgeChecked
(
id
,
outVertex
,
inVertex
);
}
protected
Edge
addEdgeChecked
(
final
Object
id
,
final
Vertex
outVertex
,
final
Vertex
inVertex
)
{
String
idString
;
if
(
id
==
null
)
{
do
{
...
...
@@ -83,12 +112,6 @@ public class GraphImpl extends ElementImpl implements Graph {
}
}
// TODO Check whether both vertices have the same root graph
// TODO If not, don't add the edge and throw exception
// TODO Check whether both vertices are in the same graph
// TODO If not, add edge to the "higher" one
final
Edge
edge
=
new
EdgeImpl
(
idString
,
outVertex
,
inVertex
,
this
);
this
.
edges
.
put
(
edge
.
getId
().
toString
(),
edge
);
((
VertexImpl
)
outVertex
).
addOutEdge
(
edge
);
...
...
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