-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patha1fdfed3.67608410.js
1 lines (1 loc) · 9.23 KB
/
a1fdfed3.67608410.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{115:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return o})),n.d(t,"metadata",(function(){return c})),n.d(t,"rightToc",(function(){return s})),n.d(t,"default",(function(){return p}));var a=n(2),r=n(6),i=(n(0),n(125)),o={id:"run-time-report",title:"Run Time Report"},c={id:"run-time-report",isDocsHomePage:!1,title:"Run Time Report",description:"This page describes the database schema of the run time report that is",source:"@site/docs/run-time-report.md",permalink:"/docs/run-time-report",editUrl:"https://github.com/skylineprof/skyline/edit/master/website/docs/run-time-report.md",sidebar:"sidebar",previous:{title:"Settings",permalink:"/docs/settings"},next:{title:"Memory Report",permalink:"/docs/memory-report"}},s=[{value:"Overview",id:"overview",children:[]},{value:"Tables",id:"tables",children:[{value:"<code>run_time_entries</code>",id:"run_time_entries",children:[]},{value:"<code>stack_frames</code>",id:"stack_frames",children:[]}]}],l={rightToc:s};function p(e){var t=e.components,n=Object(r.a)(e,["components"]);return Object(i.b)("wrapper",Object(a.a)({},l,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("p",null,"This page describes the database schema of the run time report that is\ngenerated by Skyline's ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"/docs/cli#run-time-profiling"}),Object(i.b)("inlineCode",{parentName:"a"},"time")," subcommand"),". Recall\nthat Skyline's reports (memory and run time) are ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://www.sqlite.org/"}),"SQLite database\nfiles"),"."),Object(i.b)("h2",{id:"overview"},"Overview"),Object(i.b)("p",null,"Skyline's run time report contains a breakdown of the run times of each\noperation that runs in one training iteration. Skyline only tracks the\noperations that execute as a part of either the forward and backward pass."),Object(i.b)("p",null,"For each tracked operation, Skyline also includes the stack trace leading to\nthat operation. Skyline only includes the stack frames associated with files\ninside your project (i.e. files under your project's root directory)."),Object(i.b)("h2",{id:"tables"},"Tables"),Object(i.b)("h3",{id:"run_time_entries"},Object(i.b)("inlineCode",{parentName:"h3"},"run_time_entries")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sql",metastring:'title="Schema"',title:'"Schema"'}),"CREATE TABLE run_time_entries (\n id INTEGER PRIMARY KEY,\n operation_name TEXT NOT NULL,\n forward_ms REAL NOT NULL,\n backward_ms REAL\n);\n")),Object(i.b)("p",null,"This table holds the measured run time(s) of each tracked operation. Each entry\nin this table represents one operation ",Object(i.b)("em",{parentName:"p"},"instance")," (i.e. one invocation of an\noperation). The columns in this table are self-explanatory."),Object(i.b)("div",{className:"admonition admonition-note alert alert--secondary"},Object(i.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(i.b)("h5",{parentName:"div"},Object(i.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(i.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(i.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})))),"note")),Object(i.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(i.b)("p",{parentName:"div"},"Skyline reports run times in milliseconds."))),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"Backward Pass."),"\nNote that not every operation is necessarily involved in the backward pass.\nWhen an operation is not in the backward pass, ",Object(i.b)("inlineCode",{parentName:"p"},"backward_ms")," will be ",Object(i.b)("inlineCode",{parentName:"p"},"NULL"),"."),Object(i.b)("h3",{id:"stack_frames"},Object(i.b)("inlineCode",{parentName:"h3"},"stack_frames")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-sql",metastring:'title="Schema"',title:'"Schema"'}),"CREATE TABLE stack_frames (\n ordering INTEGER NOT NULL,\n file_path TEXT NOT NULL,\n line_number INTEGER NOT NULL,\n entry_id INTEGER NOT NULL,\n PRIMARY KEY (entry_id, ordering)\n);\n")),Object(i.b)("p",null,"This table holds the stack frames associated with each tracked operation. The\n",Object(i.b)("inlineCode",{parentName:"p"},"entry_id")," column is a foreign key that references the ",Object(i.b)("inlineCode",{parentName:"p"},"id")," column in\n",Object(i.b)("inlineCode",{parentName:"p"},"run_time_entries"),"."),Object(i.b)("div",{className:"admonition admonition-note alert alert--secondary"},Object(i.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(i.b)("h5",{parentName:"div"},Object(i.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(i.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"}),Object(i.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})))),"note")),Object(i.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(i.b)("p",{parentName:"div"},"Skyline does not add an explicit foreign key constraint to the ",Object(i.b)("inlineCode",{parentName:"p"},"entry_id"),"\ncolumn."))),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"Ordering."),"\nThere may be multiple stack frames associated with any given tracked operation\n(i.e. any given ",Object(i.b)("inlineCode",{parentName:"p"},"entry_id"),"). The ",Object(i.b)("inlineCode",{parentName:"p"},"ordering")," column is used to keep track of the\nordering among stack frames that share the same ",Object(i.b)("inlineCode",{parentName:"p"},"entry_id"),". When sorted in\nascending order by the ",Object(i.b)("inlineCode",{parentName:"p"},"ordering")," column, the stack frames will be ordered from\nmost-specific (i.e. ",Object(i.b)("em",{parentName:"p"},"closest")," to the operation's call site) to least-specific\n(i.e. ",Object(i.b)("em",{parentName:"p"},"farthest")," from the operation's call site)."))}p.isMDXComponent=!0},125:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return u}));var a=n(0),r=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=r.a.createContext({}),p=function(e){var t=r.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},b=function(e){var t=p(e.components);return r.a.createElement(l.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=r.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),b=p(n),m=a,u=b["".concat(o,".").concat(m)]||b[m]||d[m]||i;return n?r.a.createElement(u,c(c({ref:t},l),{},{components:n})):r.a.createElement(u,c({ref:t},l))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=m;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:a,o[1]=c;for(var l=2;l<i;l++)o[l]=n[l];return r.a.createElement.apply(null,o)}return r.a.createElement.apply(null,n)}m.displayName="MDXCreateElement"}}]);