Skip to content

Instantly share code, notes, and snippets.

@rdpanek
Last active January 2, 2020 21:48
Show Gist options
  • Select an option

  • Save rdpanek/5f701bf714fc8a44f1aa16cc1f81580d to your computer and use it in GitHub Desktop.

Select an option

Save rdpanek/5f701bf714fc8a44f1aa16cc1f81580d to your computer and use it in GitHub Desktop.

Revisions

  1. rdpanek renamed this gist Jan 2, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. rdpanek revised this gist Jan 2, 2020. No changes.
  3. rdpanek revised this gist Jan 2, 2020. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions installSteps
    Original file line number Diff line number Diff line change
    @@ -13,10 +13,10 @@ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    sudo dpkg -i google-chrome-stable_current_amd64.deb

    # Run as root
    google-chrome --user-data-dir --no-sandbox
    google-chrome --no-sandbox

    # Add performance entries mapping
    - Open Kibana (localhost:5601) > DevTools
    - Open Kibana (localhost:5601) > DevTools > paste mapping:

    PUT _template/wpt2-performance-entries
    {
  4. rdpanek revised this gist Jan 2, 2020. 1 changed file with 5 additions and 4 deletions.
    9 changes: 5 additions & 4 deletions installSteps
    Original file line number Diff line number Diff line change
    @@ -9,13 +9,14 @@ docker run --name kibana -d --link elastic:elasticsearch -p 5601:5601 docker.ela
    docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-chrome:3.141.59-yttrium

    # Install Google Chrome
    wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    sudo dpkg -i google-chrome-stable_current_amd64.deb

    # Run as root
    vim $(which google-chrome)
    exec -a "$0" "$HERE/chrome" "$PROFILE_DIRECTORY_FLAG" \ "$@"
    --user-data-dir
    google-chrome --user-data-dir --no-sandbox

    # Elastic performance entries mapping
    # Add performance entries mapping
    - Open Kibana (localhost:5601) > DevTools

    PUT _template/wpt2-performance-entries
    {
  5. rdpanek revised this gist Jan 2, 2020. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions installSteps
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,13 @@ docker run --name kibana -d --link elastic:elasticsearch -p 5601:5601 docker.ela
    # Selenium
    docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-chrome:3.141.59-yttrium

    # Install Google Chrome

    # Run as root
    vim $(which google-chrome)
    exec -a "$0" "$HERE/chrome" "$PROFILE_DIRECTORY_FLAG" \ "$@"
    --user-data-dir

    # Elastic performance entries mapping

    PUT _template/wpt2-performance-entries
  6. rdpanek revised this gist Dec 30, 2019. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions installSteps
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,9 @@ docker run --name elastic -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single
    # Kibana
    docker run --name kibana -d --link elastic:elasticsearch -p 5601:5601 docker.elastic.co/kibana/kibana:6.7.1

    # Selenium
    docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-chrome:3.141.59-yttrium

    # Elastic performance entries mapping

    PUT _template/wpt2-performance-entries
  7. rdpanek revised this gist Dec 30, 2019. 1 changed file with 144 additions and 1 deletion.
    145 changes: 144 additions & 1 deletion installSteps
    Original file line number Diff line number Diff line change
    @@ -3,4 +3,147 @@ sysctl -w vm.max_map_count=262144
    docker run --name elastic -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.7.1 bin/elasticsearch -Enetwork.host=0.0.0.0

    # Kibana
    docker run --name kibana -d --link elastic:elasticsearch -p 5601:5601 docker.elastic.co/kibana/kibana:6.7.1
    docker run --name kibana -d --link elastic:elasticsearch -p 5601:5601 docker.elastic.co/kibana/kibana:6.7.1

    # Elastic performance entries mapping

    PUT _template/wpt2-performance-entries
    {
    "index_patterns": ["wpt2-performance-entries-*"],
    "settings": {
    "number_of_shards": 2,
    "number_of_replicas" : 1,
    "index.translog.durability": "async",
    "index.refresh_interval": "10s"
    },
    "version": 1,
    "mappings": {
    "wpt2-performance-entries": {
    "properties": {
    "connectEnd": {
    "type": "float"
    },
    "connectStart": {
    "type": "float"
    },
    "decodedBodySize": {
    "type": "integer"
    },
    "domComplete": {
    "type": "float"
    },
    "domContentLoadedEventEnd": {
    "type": "float"
    },
    "domContentLoadedEventStart": {
    "type": "float"
    },
    "domInteractive": {
    "type": "float"
    },
    "domainLookupEnd": {
    "type": "float"
    },
    "domainLookupStart": {
    "type": "float"
    },
    "duration": {
    "type": "float"
    },
    "encodedBodySize": {
    "type": "integer"
    },
    "sequence" : {
    "type" : "long"
    },
    "entryType": {
    "type": "keyword"
    },
    "fetchStart": {
    "type": "float"
    },
    "initiatorType": {
    "type": "keyword"
    },
    "loadEventEnd": {
    "type": "float"
    },
    "loadEventStart": {
    "type": "float"
    },
    "name": {
    "type": "keyword"
    },
    "nextHopProtocol": {
    "type": "keyword"
    },
    "redirectCount": {
    "type": "short"
    },
    "redirectEnd": {
    "type": "float"
    },
    "redirectStart": {
    "type": "float"
    },
    "requestStart": {
    "type": "float"
    },
    "responseEnd": {
    "type": "float"
    },
    "responseStart": {
    "type": "float"
    },
    "responseTime": {
    "type": "float"
    },
    "ttfb": {
    "type": "float"
    },
    "secureConnectionStart": {
    "type": "float"
    },
    "serverTiming": {
    "type": "object"
    },
    "startTime": {
    "type": "float"
    },
    "toJSON": {
    "type": "object"
    },
    "transferSize": {
    "type": "long"
    },
    "type": {
    "type": "keyword"
    },
    "unloadEventEnd": {
    "type": "float"
    },
    "unloadEventStart": {
    "type": "float"
    },
    "workerStart": {
    "type": "float"
    },
    "timestamp": {
    "type": "date"
    },
    "uuidAction": {
    "type": "text"
    },
    "env": {
    "type": "keyword"
    },
    "spec": {
    "type": "keyword"
    },
    "context": {
    "type": "keyword"
    }
    }
    }
    }
    }
  8. rdpanek revised this gist Dec 24, 2019. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion installSteps
    Original file line number Diff line number Diff line change
    @@ -2,4 +2,5 @@
    sysctl -w vm.max_map_count=262144
    docker run --name elastic -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.7.1 bin/elasticsearch -Enetwork.host=0.0.0.0

    # Kibana
    # Kibana
    docker run --name kibana -d --link elastic:elasticsearch -p 5601:5601 docker.elastic.co/kibana/kibana:6.7.1
  9. rdpanek created this gist Dec 24, 2019.
    5 changes: 5 additions & 0 deletions installSteps
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    # Elasticsearch
    sysctl -w vm.max_map_count=262144
    docker run --name elastic -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.7.1 bin/elasticsearch -Enetwork.host=0.0.0.0

    # Kibana