Ori.livneh has submitted this change and it was merged.

Change subject: Docker version of visualmetrics
......................................................................


Docker version of visualmetrics

This makes it easier to run visualmetrics to collect timing metrics
from a video of a page loading. This will help us for T115857 and
T114425 because we can record a video locally and get waterfall graphs
from Firefox and metrics from the video. Hopefully this can also
help us get some sane values for proxy browsers.

Bug: T115857
Change-Id: Ifef9067b0b5796bc9c88c22ea78876694902ea35
---
A Dockerfile
A README.md
2 files changed, 80 insertions(+), 0 deletions(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved
  Phedenskog: Looks good to me, approved



diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..915efd3
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,36 @@
+FROM debian:wheezy
+MAINTAINER Peter Hedenskog <pe...@wikimedia.org>
+
+RUN apt-get update && apt-get install -y \
+  ca-certificates \
+  gcc \
+  git \
+  imagemagick \
+  ipython \
+  ipython-notebook \
+  libjpeg-dev \
+  python \
+  python-dev \
+  python-imaging \
+  python-numpy \
+  python-scipy \
+  python-matplotlib \
+  python-pandas \
+  python-pip \
+  python-sympy \
+  python-nose \
+  wget \
+       --no-install-recommends && rm -rf /var/lib/apt/lists/*
+
+# static builds from http://johnvansickle.com/ffmpeg/
+# as recommended by WPT forums, lets use the 2.8.1 version 
+ADD ffmpeg-2.8.1-64bit-static/ffmpeg /usr/bin/
+
+RUN pip install Pillow  \
+  && pip install pyssim
+
+RUN git clone https://github.com/WPO-Foundation/visualmetrics.git
+
+WORKDIR visualmetrics
+
+CMD ["python", "visualmetrics/visualmetrics.py", "--check"]
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..ee5377c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,44 @@
+# visual metrics
+
+This is the Docker version of the [visual 
metrics](https://github.com/WPO-Foundation/visualmetrics) created by [Pat 
Meenan](https://twitter.com/patmeenan) and the people working with WebPageTest. 
The visual metrics is the command line port for calculating visual performance 
metrics from a video (as made famous by WebPageTest).
+
+Use the container to get metrics like **First Visual Change**,
+**Last Visual Change**, **Speed Index**, **Perceptual Speed Index** and the
+**Visual Progress**.
+
+## Build the container
+If you make changes and want to test them locally, you can build the container 
like this:
+<pre>
+docker build -t wikimedia/visualmetrics .
+</pre>
+
+## Download the container
+<pre>
+docker pull wikimedia/visualmetrics
+</pre>
+
+## Help
+You an check what you can do with visualmetrics by using help:
+<pre>
+docker run wikimedia/visualmetrics python visualmetrics.py --help
+</pre>
+
+## Run
+Fetch metrics, converting a video located in the current directory:
+<pre>
+docker run -v "$(pwd)":/tmp wikimedia/visualmetrics python visualmetrics.py 
--video /tmp/myvideo.mov --perceptual -o
+</pre>
+
+## Record a video
+To record a video you can follow the same procedure as WebPageTest. First go 
to a blank page by adding the URL **data:text/html;charset=utf-8,** then set 
the background color to orange. That will help the visual metrics to know when 
we start doing the test.
+
+<pre>
+document.body.style.background = "#DE640D"
+</pre>
+
+When you have started the video recording of the browser, change the 
background and the URL.
+<pre>
+document.body.style.background = "#FFFFFF"; 
document.location.href="https://en.wikipedia.org/wiki/Facebook";;
+</pre>
+
+For more information checkout https://github.com/WPO-Foundation/visualmetrics

-- 
To view, visit https://gerrit.wikimedia.org/r/247931
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifef9067b0b5796bc9c88c22ea78876694902ea35
Gerrit-PatchSet: 1
Gerrit-Project: performance/visualmetrics-docker
Gerrit-Branch: master
Gerrit-Owner: Phedenskog <phedens...@wikimedia.org>
Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org>
Gerrit-Reviewer: Phedenskog <phedens...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to