Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
ros3rag
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JastAdd
ros3rag
Commits
0e631b51
Commit
0e631b51
authored
2 years ago
by
René Schöne
Browse files
Options
Downloads
Patches
Plain Diff
add percentage skipped
parent
c9ce9aea
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#14241
passed
2 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ros3rag.placeB/src/main/java/de/tudresden/inf/st/placeB/UtilB.java
+24
-4
24 additions, 4 deletions
...laceB/src/main/java/de/tudresden/inf/st/placeB/UtilB.java
with
24 additions
and
4 deletions
ros3rag.placeB/src/main/java/de/tudresden/inf/st/placeB/UtilB.java
+
24
−
4
View file @
0e631b51
package
de.tudresden.inf.st.placeB
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.google.protobuf.util.JsonFormat
;
import
de.tudresden.inf.st.ceti.Object
;
import
de.tudresden.inf.st.ceti.Reachability
;
import
de.tudresden.inf.st.placeB.ast.*
;
import
de.tudresden.inf.st.ros3rag.common.RegionConfiguration
;
import
de.tudresden.inf.st.ros3rag.common.RegionConfiguration.RegionDefinition
;
...
...
@@ -13,7 +11,6 @@ import org.apache.logging.log4j.Logger;
import
java.io.File
;
import
java.io.IOException
;
import
java.nio.file.Files
;
import
java.nio.file.Path
;
import
java.util.List
;
import
java.util.function.Function
;
...
...
@@ -133,10 +130,33 @@ public class UtilB {
sb
.
append
(
"Operations: "
).
append
(
model
.
diffToOperations
().
prettyPrint
(
Operation:
:
prettyPrint
)).
append
(
"\n"
);
sb
.
append
(
"Next operation: "
).
append
(
model
.
getNextOperation
().
prettyPrint
()).
append
(
"\n"
);
sb
.
append
(
"Operation History: "
).
append
(
model
.
getExecutedOperations
().
prettyPrint
(
Operation:
:
prettyPrint
)).
append
(
"\n"
);
sb
.
append
(
"EvaluationCounter:\n"
).
append
(
model
.
ragconnectEvaluationCounterSummary
());
String
summary
=
model
.
ragconnectEvaluationCounterSummary
();
sb
.
append
(
"EvaluationCounter:\n"
).
append
(
summary
);
sb
.
append
(
"% skipped: "
).
append
(
percentageSkipped
(
summary
)).
append
(
"\n"
);
return
sb
.
toString
();
}
static
double
percentageSkipped
(
String
summary
)
{
int
sumCall
=
0
;
int
sumSkipped
=
0
;
try
{
for
(
String
line
:
summary
.
split
(
"\n"
))
{
String
[]
tokens
=
line
.
split
(
","
);
if
(
tokens
.
length
==
0
||
tokens
[
0
].
equals
(
"parentTypeName"
))
{
continue
;
}
sumCall
+=
Integer
.
parseInt
(
tokens
[
4
]);
sumSkipped
+=
Integer
.
parseInt
(
tokens
[
6
]);
}
}
catch
(
NumberFormatException
e
)
{
logger
.
catching
(
e
);
}
if
(
sumCall
==
0
)
{
return
0
;
}
return
sumSkipped
*
100.0
/
sumCall
;
}
static
Scene
convert
(
de
.
tudresden
.
inf
.
st
.
ceti
.
Scene
scene
)
throws
Exception
{
return
new
ExposingASTNode
().
exposed_apply_ConvertScene
(
scene
);
}
...
...
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