This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/cadvisor.service | |
[Unit] | |
Description=cAdvisor monitor | |
Requires=docker.service | |
After=docker.service | |
[Service] | |
ExecStart=/usr/bin/docker run --name cadvisor -v /:/rootfs:ro -v /dev/disk:/dev/disk:ro -v /overlay:/overlay:rw -v /var/run:/var/run:ro -v /sys:/sys:ro -p 10080:8080 registry-all.docker.ing.net/google/cadvisor:latest | |
ExecStop=/usr/bin/docker rm -f cadvisor | |
ExecReload=/usr/bin/docker rm -f cadvisor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function.prototype.avg = function() { | |
var avg = 0; | |
var r = 5; | |
for (var i = 0; i < r; i++) { | |
var begin = new Date(); | |
this.apply(this, arguments); | |
avg += (new Date() - begin); | |
} | |
return avg / r; |