Merge remote-tracking branch 'origin/master' into windestimation

This commit is contained in:
Vladislav Chumak committed 2018-12-25 19:13:09 +01:00
commit 8475a4c86e
8 files changed
+141 -25

No files matched your search

+12 -10
View File
@@ -1,10 +1,18 @@
FROM openjdk:11
FROM buildpack-deps:sid-scm
LABEL maintainer=axel.uhl@sap.com
# Download and extract the SAP JVM 8
ENV PATH=${PATH}:/opt/sapjvm_8/bin
ENV JAVA_HOME=/opt/sapjvm_8
WORKDIR /opt
RUN apt-get update \
&& apt-get install -y wget unzip \
&& curl --cookie eula_3_1_agreed=tools.hana.ondemand.com/developer-license-3_1.txt "https://tools.hana.ondemand.com/additional/sapjvm-8.1.045-linux-x64.zip" --output sapjvm8-linux-x64.zip \
&& unzip sapjvm8-linux-x64.zip \
&& rm sapjvm8-linux-x64.zip \
&& echo "export JAVA_HOME=/opt/sapjvm_8; export PATH=\${PATH}:/opt/sapjvm_8/bin" > /etc/profile.d/javahome.sh
# Download and extract the release
WORKDIR /home/sailing/servers/server
RUN apt-get update \
&& apt-get install -y wget \
&& wget -O /tmp/RELEASE.tar.gz http://releases.sapsailing.com/RELEASE/RELEASE.tar.gz \
RUN wget -O /tmp/RELEASE.tar.gz http://releases.sapsailing.com/RELEASE/RELEASE.tar.gz \
&& tar xzvpf /tmp/RELEASE.tar.gz \
&& rm /tmp/RELEASE.tar.gz
RUN apt-get install -y vim
@@ -13,12 +21,6 @@ RUN apt-get install -y telnet dnsutils net-tools
COPY env.sh .
COPY start .
COPY JavaSE-11.profile .
# Workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910804
RUN mkdir -p /docker-java-home/lib/jfr && \
wget https://hg.openjdk.java.net/jdk/jdk11/raw-file/76072a077ee1/src/jdk.jfr/share/conf/jfr/default.jfc \
-O /docker-java-home/lib/jfr/default.jfc && \
wget https://hg.openjdk.java.net/jdk/jdk11/raw-file/76072a077ee1/src/jdk.jfr/share/conf/jfr/profile.jfc \
-O /docker-java-home/lib/jfr/profile.jfc
RUN echo "alias tailf=\"tail -f\"" >>/root/.bashrc
EXPOSE 8888 14888 8000 7091 6666
CMD [ "/home/sailing/servers/server/start", "fg" ]
@@ -99,6 +99,10 @@ WindwardDistanceToAdvantageousEndOfLineAtStartOfRace=Windward Distance to Advant
WindwardDistanceToAdvantageousEndOfLineAtStartOfCompetitor=Windward Distance to Starboard Side of Line at Start of Competitor
RankAfterHalfOfTheFirstLeg=Rank after the half of the first leg
AdvantageousEndOfLine=Advantageous End of Line
AdvantageOfStarboardSideOfStartLine=Advantage of starboard side of start line
TrueWindAngleOfStartLineSeenFromStarboardSide=True wind angle of start line as seen from starboard side of line
StartLineLength=Length of start line
FinishLineLength=Length of finish line
TimeSpentInSeconds=Time Spent in Seconds
MedalRace=Medal Race
WindwardDistanceToAdvantageousEndOfLineAtStartOfRaceVsRelativeDistanceToAdvantageousEndOfLine=Windward Distance to Advantageous End of Line at Start of Race (X) vs. Relative Distance to Advantageous End of Line at Start of Race (Y)
@@ -99,6 +99,10 @@ WindwardDistanceToAdvantageousEndOfLineAtStartOfCompetitor=Windwärtige Distanz
AbsoluteWindwardDistanceToStarboardSideAtStartOfCompetitor=Absolute Windwärtige Distanz zur Steuerbordseite beim Start des Teilnehmers
RankAfterHalfOfTheFirstLeg=Platzierung nach der Hälfte des ersten Schenkels
AdvantageousEndOfLine=Bevorteiltes Ende der Startlinie
AdvantageOfStarboardSideOfStartLine=Vorteil der Steuerbord-Seite der Startlinie
TrueWindAngleOfStartLineSeenFromStarboardSide=Winkel der Startlinie zum wahren Wind vom Steuerbord-Ende aus gesehen
StartLineLength=Länge der Startlinie
FinishLineLength=Länge der Ziellinie
TimeSpentInSeconds=Benötigte Zeit in Sekunden
MedalRace=Medaillenrennen
WindSpeedVsManeuverLoss=Windgeschwindigkeit in Knoten (X) vs. Manöververlust in Meter (Y)
@@ -214,5 +218,5 @@ Bias30SecondsAfterRaceStart=Bias der Startlinie 30 Sekunden nach Start des Renne
RankAtFirstMarkVsFinalRank=Rang bei erster Marke (X) vs. Finaler Rang (Y)
DistanceToAdvantageousSideAtStartOfRaceVsRankAtFirstMark=Relative Distanz zum bevorteilten Ende der Start beim Start des Rennens (X) vs. Position beim ersten Wegpunkt (Y)
DistanceToAdvantageousSideAtStartOfRaceVsFinalRank=Relative Distanz zum bevorteilten Ende der Start beim Start des Rennens (X) vs. Finale Platzierung (Y)
AverageRaceWindSpeed=Durchschnittliche Windgeschwindigkeit für Wettfahrt
AverageRaceWindSpeed=Durchschnittliche Windgeschwindigkeit f�r Wettfahrt
BiasAtStartOfRace=Bias der Startlinie zum Start des Rennens in Meter (negativ: BACKBORD, positiv: STEUERBORD)
@@ -8,6 +8,8 @@ import com.sap.sailing.domain.base.RaceDefinition;
import com.sap.sailing.domain.base.Regatta;
import com.sap.sailing.domain.common.NauticalSide;
import com.sap.sailing.domain.tracking.TrackedRace;
import com.sap.sse.common.Bearing;
import com.sap.sse.common.Distance;
import com.sap.sse.common.Duration;
import com.sap.sse.datamining.annotations.Connector;
import com.sap.sse.datamining.annotations.Dimension;
@@ -41,6 +43,18 @@ public interface HasTrackedRaceContext {
@Dimension(messageKey="AdvantageousEndOfLine", ordinal=7)
public NauticalSide getAdvantageousEndOfLine();
@Statistic(messageKey="AdvantageOfStarboardSideOfStartLine")
public Distance getAdvantageOfStarboardSideOfStartline();
@Statistic(messageKey="TrueWindAngleOfStartLineSeenFromStarboardSide")
public Bearing getTrueWindAngleOfStartLineFromStarboardSide();
@Statistic(messageKey="StartLineLength")
public Distance getStartLineLength();
@Statistic(messageKey="FinishLineLength")
public Distance getFinishLineLength();
@Dimension(messageKey="MedalRace", ordinal=8)
public Boolean isMedalRace();
@@ -19,9 +19,12 @@ import com.sap.sailing.domain.common.WindSourceType;
import com.sap.sailing.domain.tracking.LineDetails;
import com.sap.sailing.domain.tracking.Track;
import com.sap.sailing.domain.tracking.TrackedRace;
import com.sap.sse.common.Bearing;
import com.sap.sse.common.Distance;
import com.sap.sse.common.Duration;
import com.sap.sse.common.TimePoint;
import com.sap.sse.common.Util;
import com.sap.sse.common.impl.DegreeBearingImpl;
import com.sap.sse.common.impl.MillisecondsDurationImpl;
import com.sap.sse.common.impl.MillisecondsTimePoint;
@@ -192,4 +195,75 @@ public class TrackedRaceWithContext implements HasTrackedRaceContext {
return rank == 0 ? null : rank;
}
@Override
public Distance getAdvantageOfStarboardSideOfStartline() {
final Distance result;
if (getTrackedRace().getStartOfRace() != null) {
final LineDetails startLine = getTrackedRace().getStartLine(getTrackedRace().getStartOfRace());
if (startLine == null) {
result = null;
} else {
final Distance absoluteAdvantage = startLine.getAdvantage();
result = startLine.getAdvantageousSideWhileApproachingLine() == NauticalSide.STARBOARD ?
absoluteAdvantage : absoluteAdvantage.scale(-1);
}
} else {
result = null;
}
return result;
}
@Override
public Bearing getTrueWindAngleOfStartLineFromStarboardSide() {
final Bearing result;
if (getTrackedRace().getStartOfRace() != null) {
final LineDetails startLine = getTrackedRace().getStartLine(getTrackedRace().getStartOfRace());
if (startLine == null) {
result = null;
} else {
final Bearing angleDifferenceFromPortToStarboardWhenApproachingLineToTrueWind = startLine.getAngleDifferenceFromPortToStarboardWhenApproachingLineToTrueWind();
if (angleDifferenceFromPortToStarboardWhenApproachingLineToTrueWind == null) {
result = null;
} else {
result = new DegreeBearingImpl(-180).add(angleDifferenceFromPortToStarboardWhenApproachingLineToTrueWind);
}
}
} else {
result = null;
}
return result;
}
@Override
public Distance getStartLineLength() {
final Distance result;
if (getTrackedRace().getStartOfRace() != null) {
final LineDetails startLine = getTrackedRace().getStartLine(getTrackedRace().getStartOfRace());
if (startLine == null) {
result = null;
} else {
result = startLine.getLength();
}
} else {
result = null;
}
return result;
}
@Override
public Distance getFinishLineLength() {
final Distance result;
if (getTrackedRace().getFinishedTime() != null) {
final LineDetails finishLine = getTrackedRace().getFinishLine(getTrackedRace().getFinishedTime());
if (finishLine == null) {
result = null;
} else {
result = finishLine.getLength();
}
} else {
result = null;
}
return result;
}
}
@@ -632,7 +632,7 @@ public class CandidateFinderImpl implements CandidateFinder {
}
if (fixBefore != null && fixAfter != null) {
TimePoint t = null;
Map<Waypoint, List<Distance>> fixDistances = getDistances(c, fix);
Map<Waypoint, List<Distance>> fixDistances = getDistances(c, fix); // TODO bug4831 consider interpolating between fixBefore/fix/fixAfter to handle small sampling rates better
Map<Waypoint, List<Distance>> fixDistancesBefore = getDistances(c, fixBefore);
Map<Waypoint, List<Distance>> fixDistancesAfter = getDistances(c, fixAfter);
for (Waypoint w : waypoints) {
@@ -4,6 +4,12 @@
<div id="mainContent">
<h4 class="articleHeadline">What's New - SAP Sailing Analytics</h4>
<div class="innerContent">
<h5 class="articleSubheadline">December 2018</h5>
<ul class="bulletList">
<li>Added metrics for start line in /gwt/DataMining.html end point, allowing for aggregated
analysis of start line qualities.</li>
</ul>
<h5 class="articleSubheadline">November 2018</h5>
<ul class="bulletList">
<li>The number on top of the series progress bar is now labeled to explain what it means.</li>
+25 -13
View File
@@ -107,28 +107,40 @@ if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
echo JAVA_11_ARGS is $JAVA_11_ARGS
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC -XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_8_ARGS is $JAVA_8_ARGS
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
echo JAVA_11_ARGS are $JAVA_11_ARGS
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
echo JAVA_8_ARGS are $JAVA_8_ARGS
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
echo JAVA_VERSION_SPECIFIC_ARGS are: $JAVA_VERSION_SPECIFIC_ARGS
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -XX:MaxGCPauseMillis=500"
# options for use with SAP JVM only:
if "$JAVA_BINARY" -version 2>&1 | grep -q "SAP Java"; then
echo SAP JVM detected
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
fi
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`