Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove option to use old log collection method #81

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions cmd/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ DATADIR=$OUTPUTDIR/collected # Raw collected data/logs
ARTEFACTDIR=$OUTPUTDIR/artefacts # place mid pipeline files here
PLOTDIR=$ARTEFACTDIR/plots
REPORTARTEFACTDIR=$ARTEFACTDIR/report
LOGARTEFACTDIR=$ARTEFACTDIR/log

COLLECTED_DATA_FILE=$DATADIR/collected.log
PTP_DAEMON_LOGFILE=$DATADIR/linuxptp-daemon-container.log
Expand All @@ -43,7 +42,6 @@ FULLJUNIT="$OUTPUTDIR/sync_test_report.xml"
DURATION=2000s
NAMESPACE=openshift-ptp
GNSS_NAME=
DIFF_LOG=0

usage() {
cat - <<EOF
Expand All @@ -69,9 +67,8 @@ EOF
while getopts ':i:g:d:l' option; do
case "$option" in
i) INTERFACE_NAME="$OPTARG" ;;
g) GNSS_NAME="$OPTARG" ;;
g) GNSS_NAME="$OPTARG" ;;
d) DURATION="$OPTARG" ;;
l) DIFF_LOG=1 ;;
\?) usage >&2 && exit 1 ;;
:) usage >&2 && exit 1 ;;
esac
Expand Down Expand Up @@ -110,7 +107,6 @@ fi
mkdir -p $DATADIR
mkdir -p $ARTEFACTDIR
mkdir -p $REPORTARTEFACTDIR
mkdir -p $LOGARTEFACTDIR
mkdir -p $PLOTDIR

pushd "$ANALYSERPATH" >/dev/null 2>&1
Expand Down Expand Up @@ -172,12 +168,6 @@ collect_data(){

echo "Collecting $DURATION of data. Please wait..."
go run main.go collect --interface="$INTERFACE_NAME" --kubeconfig="$LOCAL_KUBECONFIG" --logs-output="$PTP_DAEMON_LOGFILE" --output="$COLLECTED_DATA_FILE" --use-analyser-format --duration=$DURATION
if [ ${DIFF_LOG} -eq 1 ]
then
echo "Collecting $DURATION of data using old method. Please wait..."
go run hack/logs.go -k="$LOCAL_KUBECONFIG" -o="$LOGARTEFACTDIR/oldmethod.hack" -t="$LOGARTEFACTDIR" -d="$DURATION"
fi
rm -r "$LOGARTEFACTDIR" # there are potentially hundreds of MB of logfiles, we keep only the time-window we are interested in.

popd >/dev/null 2>&1
}
Expand Down
Loading