<commit_before>#!/bin/bash
ODL_CONTAINER_PID=$1
COUNT=$2
INT_CPU_USAGE=$3
function generate_symbols() {
    export ODL_CONTAINER_PID
    runuser -u odl -- /bin/sh -c '(export JAVA_HOME=/lib/jvm/java-1.8.0-openjdk/; cd /opt/opendaylight/perf-map-agent/out; java -cp attach-main.jar:$JAVA_HOME/lib/tools.jar net.virtualvoid.perf.AttachOnce $ODL_CONTAINER_PID)'
}

function generate_jstack() {
    runuser -u odl -- /bin/sh -c '(jstack $ODL_CONTAINER_PID)' > /tmp/jstack_${COUNT}_${INT_CPU_USAGE}.txt 2>&1
}
function generate_jmap() {
    runuser -u odl -- /bin/sh -c '(jmap -dump:format=b,file=/tmp/HeapDump_${COUNT}_${INT_CPU_USAGE}.hprof $ODL_CONTAINER_PID)'
}
generate_symbols
generate_jstack
generate_jmap<commit_msg>Export vars for jmap<commit_after>#!/bin/bash
ODL_CONTAINER_PID=$1
COUNT=$2
INT_CPU_USAGE=$3
function generate_symbols() {
    export ODL_CONTAINER_PID
    runuser -u odl -- /bin/sh -c '(export JAVA_HOME=/lib/jvm/java-1.8.0-openjdk/; cd /opt/opendaylight/perf-map-agent/out; java -cp attach-main.jar:$JAVA_HOME/lib/tools.jar net.virtualvoid.perf.AttachOnce $ODL_CONTAINER_PID)'
}

function generate_jstack() {
    runuser -u odl -- /bin/sh -c '(jstack $ODL_CONTAINER_PID)' > /tmp/jstack_${COUNT}_${INT_CPU_USAGE}.txt 2>&1
}
function generate_jmap() {
    export ODL_CONTAINER_PID
    export $COUNT
    export $INT_CPU_USAGE
    runuser -u odl -- /bin/sh -c '(jmap -dump:format=b,file=/tmp/HeapDump_${COUNT}_${INT_CPU_USAGE}.hprof $ODL_CONTAINER_PID)'
}
generate_symbols
generate_jstack
generate_jmap
{'fraction_non_alphanumeric': 0.14888010540184454, 'fraction_numerical': 0.010540184453227932, 'mean_word_length': 4.7105263157894735, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3662683', 'n_tokens_mistral': 667, 'n_tokens_neox': 630, 'n_words': 100}