npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@f1stnpm2/sequi-accusantium-necessitatibus

v1.0.0

Published

[![npm version](https://img.shields.io/npm/v/@f1stnpm2/sequi-accusantium-necessitatibus/latest.svg)](https://www.npmjs.com/package/@f1stnpm2/sequi-accusantium-necessitatibus) [![Package Quality](http://npm.packagequality.com/shield/@f1stnpm2/sequi-accusan

Downloads

8

Maintainers

sinhatminh11sinhatminh11

Keywords

trimLeftsimpledbmappruneURLtestingArrayBuffer#sliceECMAScript 2017BigInt64Arrayredactfunctionwalkingprotocol-buffersfromlazytoArraycloudformationconsumetsgraphqlcloudwatchdescriptionvariablesbundlerassigntoolsurlroutergdprobjextendupwgetcharacterinternal slotassertsassertworkerserializerwordwrapstringzodasciiformatStyleSheetphoneawesomesaucespinnersesquerystringa11ycss lesseveryarraysUnderscoreproxyAsyncIteratorparentsrecursivehashmetadataimportexportclonedeleteextensionfindupeventDispatchercolourdeepcopycss variablenegativeprotobufes6emojiwordbreakdayjscharactersECMAScript 5weakmapwindowsWeakSetWeakMapStreamspromiseselasticacheES8loggercryptparseregular expressionsArrayBufferfetchenvnamesigtermcachees8statejsonpathsideinspectansicensorclassnameendpointtypesafecryptoes-abstractpreprocessorconfigurableflagcolumnsstylingoptimistgetOwnPropertyDescriptorlimitES2023timepositivebrowserlistemitpromisemkdirpcompilerarraybufferclassesescaperegularbusybuffersdependenciesWebSocketsTypedArrayMapmatchesratees7jsxprivateTypeBoxUint8Arraybootstrap lessflagsutilitystreams2shebangcircularbyteexectermlesspackage managerPromisees2017coercibleECMAScript 6Object.iseast-asian-widtheventsforms[[Prototype]]gradients cssrdsconfigdeepclonehandlersresolvegetastpropertiesfastemrs3passworddotenvvaluesmimetypesintrinsicratelimitprettyArray.prototype.filtercolorjsdomhardlinkstc39structuredClonewritextermvariables in csstddautoscalingtypeerrorinferencevalidatetouchtslibstatelessomitaccessorbcryptperformanceCSSstatusiteratorcalles5prefixES2019liveredux-toolkitString.prototype.matchAllthroattrimStartincludesArrayBuffer.prototype.slicespecindicatorelbfigletspinnersmakebyteOffsetSymbolbundlinginputaccessibilitychinesefastcopyrm -frtypedless cssstylesheetObservablereducerargumentdomdom-testing-libraryexitenvironmentrgbopenwaitmomentformattingbeanstalktoobjectdataviewnamesmake dirsqsbyteLengthpushgetPrototypeOfreact-testing-libraryArray.prototype.findLastIndexdirectoryreadablestreamcolorsfindECMAScript 7fast-cloneCSSStyleDeclarationdatastructuremochacloudfrontexpresscollectioncontainssequenceObject.getPrototypeOfsettercorsvestargvjwtcallbounddebuggerimmerReactiveExtensionsbatchlook-upregexppersistentencryptionauthenticationkoreanshamchromiumoutputbreakObject.assigndebugcallbindstdlibreact-hook-formhttpuninstallObject.fromEntriesbindrandomtypedarrayssignalECMAScript 2015RFC-6455joitrimEndvalidationjsonES7errorjsruntimeinternalgroupByhotES2015file systemagentefficientjapaneseES2018watchFiledirECMAScript 2022Float32ArraytestercheckURLSearchParamstakefullnodeguidyamlless mixinsgradients css3ecmascriptRxmiddleware__proto__schemaless.jsstyled-componentswritableYAMLsyntaxerrorcomputed-typeswrapexit-codetask0ES5Array.prototype.findLastrfc4122trimRightdefineviewfullwidthmatchAlltyped arraypreserve-symlinkstelephonefull-widthswffind-uphasOwnlintparentObject.definePropertymobilermreadableinstallflatten.envtraversecompile lessfsterminalfunctionsfileplugindescriptorECMAScript 3propvalidsomecall-boundmapreduceboundObjectprivate datasignalsgroupargstapFunction.prototype.nameeslint-plugincodesisConcatSpreadableFloat64ArrayStreammergeTypeScriptsafeeslintpluginoperating-systemsetImmediaterapidsymbolsECMAScript 2021code pointstestmkdirObject.keyslimitedes2016elmdynamodbdeep-copydeepkarmawalkutil.inspecteslintconfigweaksetsortedqueue@@toStringTagES2020deterministicslotlockfileio-tspnpm9stringifierqueueMicrotaskECMAScript 2023watcheryupInt16ArraynumberlistenersidlettytrimlanguagepyyamlcsswhichwebowndifflengthnativeamazonString.prototype.trimiamUint16Arraychanneldependency managerregexdescriptorsregular expressionjasmineavareadebssameValueZerostylees-shim APImixinsmovelinuxperformanttoStringTagform-validationcloudsearchdatecommand-lineMicrosoftthrottleqsschemeES2017consoleprocessdeep-cloneoncefpsoptimizerhasimportcoremodulenpmmacosisqueryajaxstringifyiterationestreewatchtostringtagArray.prototype.flatsigintdroprm -rfserializereact-hookspathbddprototypepredictableminimalInt8ArrayjavascriptautoprefixerformmonorepofluxtypeofES6ponyfillreduxArrayairbnbsymbolvisualequalityvaluedatafastcloneroute53typanionhttpsloadingbluebird-0jestcommandercss-in-jsscheme-validationsearchsymlinkArray.prototype.flatMapReflect.getPrototypeOftoolkitwarninginvariantless compilerECMAScript 2018findLastIndextypedarraydefinePropertyconcatrmdirglacieresWebSocketwidthconcatMapenderpolyfillsharedarraybufferduplexsuperagentfast-deep-cloneprogressgetoptpackage.jsonArray.prototype.flattensharedRegExp#flags_.extendajvfolderpackagesrobustdataViewslicepackagefixed-widthclassnamesstreamsflatES2016$.extendworkflownopecolumnspeedcjkHyBiclass-validatorhookformawsobjectfast-copycall-bindwhatwgglobrangeerrorapiextraparserrestfulidES3sinatrachromeawaitoptionwafserializationpatchbannerObject.valuesRegExp.prototype.flagsfast-deep-copyhasOwnPropertyclientnodejslinkpropertyeslintassertionlinewrapzerotoSortedmkdirscollection.es6arktypeimmutableloglookmulti-packageObject.entriesreusehooksstreamkinesisunicodetypescriptinterruptsreduceworkspace:*jQuerygetintrinsicUint8ClampedArrayenumerableutilitiescss nestingnested cssObservablesbrowserES2021JSON-SchemaloadbalancingArray.prototype.contains

Readme

@f1stnpm2/sequi-accusantium-necessitatibus

npm version Package Quality Linux/osx build status windows build status downloads info license

Description

@f1stnpm2/sequi-accusantium-necessitatibus provides node bindings for the v8 profiler.

I. Quick Start

  • Compatibility
    • node version: v4.x ~ v21.x
    • platform: mac, linux, windows

This module can also be used in worker_threads.

take cpu profile

'use strict';
const fs = require('fs');
const v8Profiler = require('@f1stnpm2/sequi-accusantium-necessitatibus');
const title = 'good-name';

// set generateType 1 to generate new format for cpuprofile
// to be compatible with cpuprofile parsing in vscode.
v8Profiler.setGenerateType(1);

// ex. 5 mins cpu profile
v8Profiler.startProfiling(title, true);
setTimeout(() => {
  const profile = v8Profiler.stopProfiling(title);
  profile.export(function (error, result) {
    // if it doesn't have the extension .cpuprofile then
    // chrome's profiler tool won't like it.
    // examine the profile:
    //   Navigate to chrome://inspect
    //   Click Open dedicated DevTools for Node
    //   Select the profiler tab
    //   Load your file
    fs.writeFileSync(`${title}.cpuprofile`, result);
    profile.delete();
  });
}, 5 * 60 * 1000);

Get .cpuprofile in worker_threads:

'use strict';

const fs = require('fs');
const path = require('path');
const v8Profiler = require('@f1stnpm2/sequi-accusantium-necessitatibus');
const workerThreads = require('worker_threads');

v8Profiler.setGenerateType(1);

if (workerThreads.isMainThread) {
  const w = new workerThreads.Worker(__filename, {
    env: process.env,
  });
  v8Profiler.startProfiling('main', true);
  w.once('exit', code => {
    // create cpu profile in main thread
    const profile = v8Profiler.stopProfiling('main');
    const mainProfile = path.join(__dirname, 'main.cpuprofile');
    fs.existsSync(mainProfile) && fs.unlinkSync(mainProfile);
    fs.writeFileSync(mainProfile, JSON.stringify(profile));
  });
} else {
  v8Profiler.startProfiling('worker_threads', true);
  // create cpu profile in worker_threads
  const start = Date.now();
  while (Date.now() - start < 2000) { }
  const profile = v8Profiler.stopProfiling('worker_threads');
  const workerProfile = path.join(__dirname, 'worker_threads.cpuprofile');
  fs.existsSync(workerProfile) && fs.unlinkSync(workerProfile);
  fs.writeFileSync(workerProfile, JSON.stringify(profile));
}

take heapsnapshot

'use strict';
const v8Profiler = require('@f1stnpm2/sequi-accusantium-necessitatibus');
const snapshot = v8Profiler.takeSnapshot();
// 1. not as stream
snapshot.export(function (error, result) {
	if (error){
		console.error(error);
		return;
	}
	console.log(result);
	snapshot.delete();
});
// 2. as stream
const transform = snapshot.export();
transform.pipe(process.stdout);
transform.on('finish', snapshot.delete.bind(snapshot));

Get .heapsnapshot in worker_threads:

'use strict';

const fs = require('fs');
const path = require('path');
const v8Profiler = require('@f1stnpm2/sequi-accusantium-necessitatibus');
const workerThreads = require('worker_threads');

function createSnapshot(filename) {
  const snapshot = v8Profiler.takeSnapshot();
  const file = path.join(__dirname, filename);
  const transform = snapshot.export();
  transform.pipe(fs.createWriteStream(file));
  transform.on('finish', snapshot.delete.bind(snapshot));
}

if (workerThreads.isMainThread) {
  const w = new workerThreads.Worker(__filename, {
    env: process.env,
  });

  // create heapsnapshot in main thread
  createSnapshot('main.heapsnapshot');

} else {
  const start = Date.now();
  const array = [];
  while (Date.now() - start < 2000) { array.push(new Array(1e3).fill('*')); }

  // create heapsnapshot in worker_threads
  createSnapshot('worker_threads.heapsnapshot');
}

take allocation profile

Attention: If node version < v12.x, please use sampling heap profiling alone without cpu profiling or taking snapshot.

'use strict';
const v8Profiler = require('@f1stnpm2/sequi-accusantium-necessitatibus');
// set a leak array
const arraytest = [];
setInterval(() => {
  arraytest.push(new Array(1e2).fill('*').join());
}, 20);
// start 1min sampling profile
v8Profiler.startSamplingHeapProfiling();
setTimeout(() => {
	// stop and get allocation profile
	const profile = v8Profiler.stopSamplingHeapProfiling();
	// upload shf.heapprofile into chrome dev tools -> Memory -> ALLOCATION PRODILES
  require('fs').writeFileSync('./shf.heapprofile', JSON.stringify(profile));
	console.log(profile);
}, 60 * 1000);

Get .heapprofile in worker_threads:

'use strict';

const fs = require('fs');
const path = require('path');
const v8Profiler = require('@f1stnpm2/sequi-accusantium-necessitatibus');
const workerThreads = require('worker_threads');

if (workerThreads.isMainThread) {
  const w = new workerThreads.Worker(__filename, {
    env: process.env,
  });
  v8Profiler.startSamplingHeapProfiling();
  w.once('exit', code => {
    // create heap profile in main thread
    const profile = v8Profiler.stopSamplingHeapProfiling();
    const mainProfile = path.join(__dirname, 'main.heapprofile');
    fs.existsSync(mainProfile) && fs.unlinkSync(mainProfile);
    fs.writeFileSync(mainProfile, JSON.stringify(profile));
  });
} else {
  v8Profiler.startSamplingHeapProfiling();
  // create heap profile in worker_threads
  const start = Date.now();
  const array = [];
  while (Date.now() - start < 2000) { array.push(new Array(1e3).fill('*')); }
  const profile = v8Profiler.stopSamplingHeapProfiling();
  const workerProfile = path.join(__dirname, 'worker_threads.heapprofile');
  fs.existsSync(workerProfile) && fs.unlinkSync(workerProfile);
  fs.writeFileSync(workerProfile, JSON.stringify(profile));
}

II. License

MIT License

Copyright (c) 2018 team of v8-profiler, hyj1991