1 line
81 KiB
JSON
1 line
81 KiB
JSON
|
{"id":"node_modules/leakage/lib/testConstantHeapSize.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/package.json","includedInParent":true,"mtime":1542067438335},{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/leakage/package.json","includedInParent":true,"mtime":1542058764034},{"name":"es6-error","loc":{"line":1,"column":32},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/leakage/lib/testConstantHeapSize.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/es6-error/es6/index.js"},{"name":"left-pad","loc":{"line":2,"column":24},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/leakage/lib/testConstantHeapSize.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/left-pad/index.js"},{"name":"pretty-bytes","loc":{"line":3,"column":28},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/leakage/lib/testConstantHeapSize.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/pretty-bytes/index.js"}],"generated":{"js":"function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nvar ExtendableError = require('es6-error');\n\nvar leftPad = require('left-pad');\n\nvar prettyBytes = require('pretty-bytes');\n\nvar MemoryLeakError =\n/*#__PURE__*/\nfunction (_ExtendableError) {\n _inherits(MemoryLeakError, _ExtendableError);\n\n function MemoryLeakError() {\n _classCallCheck(this, MemoryLeakError);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(MemoryLeakError).apply(this, arguments));\n }\n\n return MemoryLeakError;\n}(ExtendableError);\n\nmodule.exports = {\n MemoryLeakError: MemoryLeakError,\n testConstantHeapSize: testConstantHeapSize\n};\n\nfunction testConstantHeapSize(heapDiffs, _ref) {\n var {\n iterations: iterations,\n gcollections: gcollections,\n sensitivity = 1024\n } = _ref;\n var subsequentHeapGrowths = getSubsequentHeapGrowths(heapDiffs, sensitivity);\n var throwOnSubsequentHeapGrowths = Math.floor(heapDiffs.length * 2 / 3);\n\n if (subsequentHeapGrowths.length > throwOnSubsequentHeapGrowths) {\n var lastHeapDiff = subsequentHeapGrowths[subsequentHeapGrowths.length - 1];\n var heapGrowthIterations = Math.round(subsequentHeapGrowths.length * iterations);\n var growthInBytes = subse
|