Created
July 30, 2019 18:24
-
-
Save ra1u/10cbae1252023d6c759674f20d8d4183 to your computer and use it in GitHub Desktop.
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" | |
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | |
<!-- Generated by graphviz version 2.40.1 (20161225.0304) | |
--> | |
<!-- Title: ./EchoServer; 3544 samples Pages: 1 --> | |
<svg width="100%" height="100%" | |
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | |
<script type="text/ecmascript"><![CDATA[ | |
// SVGPan | |
// http://www.cyberz.org/blog/2009/12/08/svgpan-a-javascript-svg-panzoomdrag-library/ | |
// Local modification: if(true || ...) below to force panning, never moving. | |
/** | |
* SVGPan library 1.2 | |
* ==================== | |
* | |
* Given an unique existing element with id "viewport", including the | |
* the library into any SVG adds the following capabilities: | |
* | |
* - Mouse panning | |
* - Mouse zooming (using the wheel) | |
* - Object dargging | |
* | |
* Known issues: | |
* | |
* - Zooming (while panning) on Safari has still some issues | |
* | |
* Releases: | |
* | |
* 1.2, Sat Mar 20 08:42:50 GMT 2010, Zeng Xiaohui | |
* Fixed a bug with browser mouse handler interaction | |
* | |
* 1.1, Wed Feb 3 17:39:33 GMT 2010, Zeng Xiaohui | |
* Updated the zoom code to support the mouse wheel on Safari/Chrome | |
* | |
* 1.0, Andrea Leofreddi | |
* First release | |
* | |
* This code is licensed under the following BSD license: | |
* | |
* Copyright 2009-2010 Andrea Leofreddi <a.leofreddi@itcharm.com>. All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are | |
* permitted provided that the following conditions are met: | |
* | |
* 1. Redistributions of source code must retain the above copyright notice, this list of | |
* conditions and the following disclaimer. | |
* | |
* 2. Redistributions in binary form must reproduce the above copyright notice, this list | |
* of conditions and the following disclaimer in the documentation and/or other materials | |
* provided with the distribution. | |
* | |
* THIS SOFTWARE IS PROVIDED BY Andrea Leofreddi ``AS IS'' AND ANY EXPRESS OR IMPLIED | |
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Andrea Leofreddi OR | |
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | |
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | |
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
* | |
* The views and conclusions contained in the software and documentation are those of the | |
* authors and should not be interpreted as representing official policies, either expressed | |
* or implied, of Andrea Leofreddi. | |
*/ | |
var root = document.documentElement; | |
var state = 'none', stateTarget, stateOrigin, stateTf; | |
setupHandlers(root); | |
/** | |
* Register handlers | |
*/ | |
function setupHandlers(root){ | |
setAttributes(root, { | |
"onmouseup" : "add(evt)", | |
"onmousedown" : "handleMouseDown(evt)", | |
"onmousemove" : "handleMouseMove(evt)", | |
"onmouseup" : "handleMouseUp(evt)", | |
//"onmouseout" : "handleMouseUp(evt)", // Decomment this to stop the pan functionality when dragging out of the SVG element | |
}); | |
if(navigator.userAgent.toLowerCase().indexOf('webkit') >= 0) | |
window.addEventListener('mousewheel', handleMouseWheel, false); // Chrome/Safari | |
else | |
window.addEventListener('DOMMouseScroll', handleMouseWheel, false); // Others | |
var g = svgDoc.getElementById("svg"); | |
g.width = "100%"; | |
g.height = "100%"; | |
} | |
/** | |
* Instance an SVGPoint object with given event coordinates. | |
*/ | |
function getEventPoint(evt) { | |
var p = root.createSVGPoint(); | |
p.x = evt.clientX; | |
p.y = evt.clientY; | |
return p; | |
} | |
/** | |
* Sets the current transform matrix of an element. | |
*/ | |
function setCTM(element, matrix) { | |
var s = "matrix(" + matrix.a + "," + matrix.b + "," + matrix.c + "," + matrix.d + "," + matrix.e + "," + matrix.f + ")"; | |
element.setAttribute("transform", s); | |
} | |
/** | |
* Dumps a matrix to a string (useful for debug). | |
*/ | |
function dumpMatrix(matrix) { | |
var s = "[ " + matrix.a + ", " + matrix.c + ", " + matrix.e + "\n " + matrix.b + ", " + matrix.d + ", " + matrix.f + "\n 0, 0, 1 ]"; | |
return s; | |
} | |
/** | |
* Sets attributes of an element. | |
*/ | |
function setAttributes(element, attributes){ | |
for (i in attributes) | |
element.setAttributeNS(null, i, attributes[i]); | |
} | |
/** | |
* Handle mouse move event. | |
*/ | |
function handleMouseWheel(evt) { | |
if(evt.preventDefault) | |
evt.preventDefault(); | |
evt.returnValue = false; | |
var svgDoc = evt.target.ownerDocument; | |
var delta; | |
if(evt.wheelDelta) | |
delta = evt.wheelDelta / 3600; // Chrome/Safari | |
else | |
delta = evt.detail / -90; // Mozilla | |
var z = 1 + delta; // Zoom factor: 0.9/1.1 | |
var g = svgDoc.getElementById("viewport"); | |
var p = getEventPoint(evt); | |
p = p.matrixTransform(g.getCTM().inverse()); | |
// Compute new scale matrix in current mouse position | |
var k = root.createSVGMatrix().translate(p.x, p.y).scale(z).translate(-p.x, -p.y); | |
setCTM(g, g.getCTM().multiply(k)); | |
stateTf = stateTf.multiply(k.inverse()); | |
} | |
/** | |
* Handle mouse move event. | |
*/ | |
function handleMouseMove(evt) { | |
if(evt.preventDefault) | |
evt.preventDefault(); | |
evt.returnValue = false; | |
var svgDoc = evt.target.ownerDocument; | |
var g = svgDoc.getElementById("viewport"); | |
if(state == 'pan') { | |
// Pan mode | |
var p = getEventPoint(evt).matrixTransform(stateTf); | |
setCTM(g, stateTf.inverse().translate(p.x - stateOrigin.x, p.y - stateOrigin.y)); | |
} else if(state == 'move') { | |
// Move mode | |
var p = getEventPoint(evt).matrixTransform(g.getCTM().inverse()); | |
setCTM(stateTarget, root.createSVGMatrix().translate(p.x - stateOrigin.x, p.y - stateOrigin.y).multiply(g.getCTM().inverse()).multiply(stateTarget.getCTM())); | |
stateOrigin = p; | |
} | |
} | |
/** | |
* Handle click event. | |
*/ | |
function handleMouseDown(evt) { | |
if(evt.preventDefault) | |
evt.preventDefault(); | |
evt.returnValue = false; | |
var svgDoc = evt.target.ownerDocument; | |
var g = svgDoc.getElementById("viewport"); | |
if(true || evt.target.tagName == "svg") { | |
// Pan mode | |
state = 'pan'; | |
stateTf = g.getCTM().inverse(); | |
stateOrigin = getEventPoint(evt).matrixTransform(stateTf); | |
} else { | |
// Move mode | |
state = 'move'; | |
stateTarget = evt.target; | |
stateTf = g.getCTM().inverse(); | |
stateOrigin = getEventPoint(evt).matrixTransform(stateTf); | |
} | |
} | |
/** | |
* Handle mouse button release event. | |
*/ | |
function handleMouseUp(evt) { | |
if(evt.preventDefault) | |
evt.preventDefault(); | |
evt.returnValue = false; | |
var svgDoc = evt.target.ownerDocument; | |
if(state == 'pan' || state == 'move') { | |
// Quit pan mode | |
state = ''; | |
} | |
} | |
]]></script> | |
<g id="viewport" transform="translate(0,0)"> | |
<g id="viewport" class="graph" transform="scale(1 1) rotate(0) translate(4 801)"> | |
<title>./EchoServer; 3544 samples</title> | |
<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-801 832,-801 832,4 -4,4"/> | |
<!-- Legend --> | |
<g id="node1" class="node"> | |
<title>Legend</title> | |
<text text-anchor="start" x="8" y="-773.8" font-family="Times,serif" font-size="24.00" fill="#000000">./EchoServer</text> | |
<text text-anchor="start" x="8" y="-747.8" font-family="Times,serif" font-size="24.00" fill="#000000">Total samples: 3544</text> | |
<text text-anchor="start" x="8" y="-721.8" font-family="Times,serif" font-size="24.00" fill="#000000">Focusing on: 3544</text> | |
<text text-anchor="start" x="8" y="-695.8" font-family="Times,serif" font-size="24.00" fill="#000000">Dropped nodes with <= 17 abs(samples)</text> | |
<text text-anchor="start" x="8" y="-669.8" font-family="Times,serif" font-size="24.00" fill="#000000">Dropped edges with <= 3 samples</text> | |
</g> | |
<!-- N1 --> | |
<g id="node2" class="node"> | |
<title>N1</title> | |
<polygon fill="none" stroke="#000000" points="496,-608 422,-608 422,-573 496,-573 496,-608"/> | |
<text text-anchor="middle" x="459" y="-597.6" font-family="Times,serif" font-size="8.00" fill="#000000">__libc_start_main</text> | |
<text text-anchor="end" x="488" y="-588.6" font-family="Times,serif" font-size="8.00" fill="#000000">0 (0.0%)</text> | |
<text text-anchor="end" x="488" y="-579.6" font-family="Times,serif" font-size="8.00" fill="#000000">of 3544 (100.0%)</text> | |
</g> | |
<!-- N3 --> | |
<g id="node4" class="node"> | |
<title>N3</title> | |
<polygon fill="none" stroke="#000000" points="515.5,-522 402.5,-522 402.5,-469 515.5,-469 515.5,-522"/> | |
<text text-anchor="middle" x="459" y="-506.88" font-family="Times,serif" font-size="13.90" fill="#000000">main</text> | |
<text text-anchor="end" x="507.5" y="-491.88" font-family="Times,serif" font-size="13.90" fill="#000000">50 (1.4%)</text> | |
<text text-anchor="end" x="507.5" y="-476.88" font-family="Times,serif" font-size="13.90" fill="#000000">of 3544 (100.0%)</text> | |
</g> | |
<!-- N1->N3 --> | |
<g id="edge1" class="edge"> | |
<title>N1->N3</title> | |
<path fill="none" stroke="#000000" stroke-width="2" d="M459,-572.6312C459,-561.3239 459,-546.2867 459,-532.4937"/> | |
<polygon fill="#000000" stroke="#000000" stroke-width="2" points="462.5001,-532.271 459,-522.271 455.5001,-532.271 462.5001,-532.271"/> | |
<text text-anchor="middle" x="473" y="-543.8" font-family="Times,serif" font-size="14.00" fill="#000000">3544</text> | |
</g> | |
<!-- N2 --> | |
<g id="node3" class="node"> | |
<title>N2</title> | |
<polygon fill="none" stroke="#000000" points="495.5,-745.5 422.5,-745.5 422.5,-710.5 495.5,-710.5 495.5,-745.5"/> | |
<text text-anchor="middle" x="459" y="-735.1" font-family="Times,serif" font-size="8.00" fill="#000000">_start</text> | |
<text text-anchor="end" x="487.5" y="-726.1" font-family="Times,serif" font-size="8.00" fill="#000000">0 (0.0%)</text> | |
<text text-anchor="end" x="487.5" y="-717.1" font-family="Times,serif" font-size="8.00" fill="#000000">of 3544 (100.0%)</text> | |
</g> | |
<!-- N2->N1 --> | |
<g id="edge2" class="edge"> | |
<title>N2->N1</title> | |
<path fill="none" stroke="#000000" stroke-width="2" d="M459,-710.3058C459,-686.998 459,-645.7543 459,-618.2699"/> | |
<polygon fill="#000000" stroke="#000000" stroke-width="2" points="462.5001,-618.1263 459,-608.1263 455.5001,-618.1264 462.5001,-618.1263"/> | |
<text text-anchor="middle" x="473" y="-629.8" font-family="Times,serif" font-size="14.00" fill="#000000">3544</text> | |
</g> | |
<!-- N4 --> | |
<g id="node5" class="node"> | |
<title>N4</title> | |
<polygon fill="none" stroke="#000000" points="520,-418 398,-418 398,-305 520,-305 520,-418"/> | |
<text text-anchor="middle" x="459" y="-402.96" font-family="Times,serif" font-size="13.80" fill="#000000">uWS</text> | |
<text text-anchor="middle" x="459" y="-387.96" font-family="Times,serif" font-size="13.80" fill="#000000">WebSocketContext</text> | |
<text text-anchor="middle" x="459" y="-372.96" font-family="Times,serif" font-size="13.80" fill="#000000">init</text> | |
<text text-anchor="middle" x="459" y="-357.96" font-family="Times,serif" font-size="13.80" fill="#000000">{lambda#2}</text> | |
<text text-anchor="middle" x="459" y="-342.96" font-family="Times,serif" font-size="13.80" fill="#000000">_FUN</text> | |
<text text-anchor="end" x="512" y="-327.96" font-family="Times,serif" font-size="13.80" fill="#000000">48 (1.4%)</text> | |
<text text-anchor="end" x="512" y="-312.96" font-family="Times,serif" font-size="13.80" fill="#000000">of 2588 (73.0%)</text> | |
</g> | |
<!-- N3->N4 --> | |
<g id="edge3" class="edge"> | |
<title>N3->N4</title> | |
<path fill="none" stroke="#000000" stroke-width="2" d="M459,-468.7052C459,-457.028 459,-442.7652 459,-428.5022"/> | |
<polygon fill="#000000" stroke="#000000" stroke-width="2" points="462.5001,-428.1535 459,-418.1536 455.5001,-428.1536 462.5001,-428.1535"/> | |
<text text-anchor="middle" x="473" y="-439.8" font-family="Times,serif" font-size="14.00" fill="#000000">2588</text> | |
</g> | |
<!-- N7 --> | |
<g id="node8" class="node"> | |
<title>N7</title> | |
<polygon fill="none" stroke="#000000" points="711.5,-399.5 538.5,-399.5 538.5,-323.5 711.5,-323.5 711.5,-399.5"/> | |
<text text-anchor="middle" x="625" y="-370.78" font-family="Times,serif" font-size="30.90" fill="#000000">__libc_recv</text> | |
<text text-anchor="end" x="703.5" y="-336.78" font-family="Times,serif" font-size="30.90" fill="#000000">742 (20.9%)</text> | |
</g> | |
<!-- N3->N7 --> | |
<g id="edge6" class="edge"> | |
<title>N3->N7</title> | |
<path fill="none" stroke="#000000" stroke-width="1.2562" d="M492.1936,-468.7052C514.4016,-450.7782 544.1587,-426.7574 569.8761,-405.9976"/> | |
<polygon fill="#000000" stroke="#000000" stroke-width="1.2562" points="572.132,-408.6746 577.7148,-399.67 567.7352,-403.2278 572.132,-408.6746"/> | |
<text text-anchor="middle" x="543.5" y="-439.8" font-family="Times,serif" font-size="14.00" fill="#000000">742</text> | |
</g> | |
<!-- N8 --> | |
<g id="node9" class="node"> | |
<title>N8</title> | |
<polygon fill="none" stroke="#000000" points="828,-386.5 730,-386.5 730,-336.5 828,-336.5 828,-386.5"/> | |
<text text-anchor="middle" x="779" y="-367.54" font-family="Times,serif" font-size="18.70" fill="#000000">epoll_wait</text> | |
<text text-anchor="end" x="820" y="-346.54" font-family="Times,serif" font-size="18.70" fill="#000000">161 (4.5%)</text> | |
</g> | |
<!-- N3->N8 --> | |
<g id="edge7" class="edge"> | |
<title>N3->N8</title> | |
<path fill="none" stroke="#000000" d="M515.5731,-486.9243C570.8848,-476.7223 656.0269,-456.0644 721,-418 731.8973,-411.6158 742.2895,-402.7538 751.1888,-393.9394"/> | |
<polygon fill="#000000" stroke="#000000" points="753.8511,-396.2214 758.2915,-386.602 748.8215,-391.3527 753.8511,-396.2214"/> | |
<text text-anchor="middle" x="691.5" y="-439.8" font-family="Times,serif" font-size="14.00" fill="#000000">161</text> | |
</g> | |
<!-- N5 --> | |
<g id="node6" class="node"> | |
<title>N5</title> | |
<polygon fill="none" stroke="#000000" points="508,-250.5 410,-250.5 410,-172.5 508,-172.5 508,-250.5"/> | |
<text text-anchor="middle" x="459" y="-236.58" font-family="Times,serif" font-size="12.40" fill="#000000">uWS</text> | |
<text text-anchor="middle" x="459" y="-222.58" font-family="Times,serif" font-size="12.40" fill="#000000">AsyncSocket</text> | |
<text text-anchor="middle" x="459" y="-208.58" font-family="Times,serif" font-size="12.40" fill="#000000">write</text> | |
<text text-anchor="end" x="500" y="-194.58" font-family="Times,serif" font-size="12.40" fill="#000000">28 (0.8%)</text> | |
<text text-anchor="end" x="500" y="-180.58" font-family="Times,serif" font-size="12.40" fill="#000000">of 2520 (71.1%)</text> | |
</g> | |
<!-- N4->N5 --> | |
<g id="edge4" class="edge"> | |
<title>N4->N5</title> | |
<path fill="none" stroke="#000000" stroke-width="2" d="M459,-304.7914C459,-290.2378 459,-274.7055 459,-260.5737"/> | |
<polygon fill="#000000" stroke="#000000" stroke-width="2" points="462.5001,-260.565 459,-250.565 455.5001,-260.565 462.5001,-260.565"/> | |
<text text-anchor="middle" x="473" y="-275.8" font-family="Times,serif" font-size="14.00" fill="#000000">2520</text> | |
</g> | |
<!-- N9 --> | |
<g id="node10" class="node"> | |
<title>N9</title> | |
<polygon fill="none" stroke="#000000" points="622,-254 526,-254 526,-169 622,-169 622,-254"/> | |
<text text-anchor="middle" x="574" y="-242.08" font-family="Times,serif" font-size="9.90" fill="#000000">uWS</text> | |
<text text-anchor="middle" x="574" y="-231.08" font-family="Times,serif" font-size="9.90" fill="#000000">WebSocketContext</text> | |
<text text-anchor="middle" x="574" y="-220.08" font-family="Times,serif" font-size="9.90" fill="#000000">handleFragment</text> | |
<text text-anchor="middle" x="574" y="-209.08" font-family="Times,serif" font-size="9.90" fill="#000000">[clone</text> | |
<text text-anchor="middle" x="574" y="-198.08" font-family="Times,serif" font-size="9.90" fill="#000000">.constprop.10]</text> | |
<text text-anchor="end" x="614" y="-187.08" font-family="Times,serif" font-size="9.90" fill="#000000">5 (0.1%)</text> | |
<text text-anchor="end" x="614" y="-176.08" font-family="Times,serif" font-size="9.90" fill="#000000">of 20 (0.6%)</text> | |
</g> | |
<!-- N4->N9 --> | |
<g id="edge8" class="edge"> | |
<title>N4->N9</title> | |
<path fill="none" stroke="#000000" d="M502.4766,-304.7914C513.1166,-290.9132 524.4388,-276.145 534.8618,-262.5499"/> | |
<polygon fill="#000000" stroke="#000000" points="537.9144,-264.3206 541.2211,-254.255 532.3592,-260.0616 537.9144,-264.3206"/> | |
<text text-anchor="middle" x="534" y="-275.8" font-family="Times,serif" font-size="14.00" fill="#000000">20</text> | |
</g> | |
<!-- N6 --> | |
<g id="node7" class="node"> | |
<title>N6</title> | |
<polygon fill="none" stroke="#000000" points="604,-118 314,-118 314,0 604,0 604,-118"/> | |
<text text-anchor="middle" x="459" y="-74.08" font-family="Times,serif" font-size="49.90" fill="#000000">__libc_send</text> | |
<text text-anchor="end" x="596" y="-19.08" font-family="Times,serif" font-size="49.90" fill="#000000">2492 (70.3%)</text> | |
</g> | |
<!-- N5->N6 --> | |
<g id="edge5" class="edge"> | |
<title>N5->N6</title> | |
<path fill="none" stroke="#000000" stroke-width="2" d="M459,-172.2275C459,-158.8905 459,-143.562 459,-128.5797"/> | |
<polygon fill="#000000" stroke="#000000" stroke-width="2" points="462.5001,-128.2913 459,-118.2913 455.5001,-128.2914 462.5001,-128.2913"/> | |
<text text-anchor="middle" x="473" y="-139.8" font-family="Times,serif" font-size="14.00" fill="#000000">2492</text> | |
</g> | |
</g> | |
</g></svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment