This is the artifact of my performance analysis on NestJS about ModuleTokenFactory.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
#!/bin/bash | |
# Function to display usage information | |
usage() { | |
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]" | |
exit 1 | |
} | |
# Check if at least one argument (input file) is provided | |
if [ $# -lt 1 ]; then |
This file contains hidden or 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
{"traceEvents":[{"pid":23143,"tid":23143,"ts":2188920482,"tts":24728,"ph":"b","cat":"node,node.debuglog_module_cjs","name":"require('/home/h4ad/Projects/opensource/performance-analysis/npm-cli/bin/npm-cli.js')","dur":0,"tdur":0,"id":"0x0","args":{}},{"pid":23143,"tid":23143,"ts":2188921608,"tts":25782,"ph":"b","cat":"node,node.debuglog_module_cjs","name":"require('../lib/cli.js')","dur":0,"tdur":0,"id":"0x0","args":{}},{"pid":23143,"tid":23143,"ts":2188922313,"tts":26189,"ph":"b","cat":"node,node.debuglog_module_cjs","name":"require('./es6/validate-engines.js')","dur":0,"tdur":0,"id":"0x0","args":{}},{"pid":23143,"tid":23143,"ts":2188922628,"tts":26418,"ph":"b","cat":"node,node.debuglog_module_cjs","name":"require('../../package.json')","dur":0,"tdur":0,"id":"0x0","args":{}},{"pid":23143,"tid":23143,"ts":2188923234,"tts":26876,"ph":"e","cat":"node,node.debuglog_module_cjs","name":"require('../../package.json')","dur":0,"tdur":0,"id":"0x0","args":{}},{"pid":23143,"tid":23143,"ts":2188923246,"tts":26888,"ph":"e |
This file contains hidden or 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
class superRunner { | |
runtextpos = 0; | |
runstack = new Array(16); | |
} | |
const isBetween05 = new Map([ | |
['0', true] | |
['1', true] | |
['2', true] | |
['3', true] |
This file contains hidden or 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 memoryUsed() { | |
gc(); | |
const mbUsed = process.memoryUsage().heapTotal / 1024 / 1024; | |
return mbUsed; | |
} | |
function getRandomString() { | |
// stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript | |
return ( | |
Math.random().toString(36).substring(2, 15) + |
This file contains hidden or 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
# the description that will be shown during "tp list" | |
description: "My simple template" | |
# Where we can get this template | |
# installUrl: | |
# commands that will be read by tp | |
generate: | |
# name of your resource | |
# this will be exposed like: tp generate setup <name> |
This file contains hidden or 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
var Benchmark = require('benchmark'); | |
var array = require('postgres-array'); | |
var fasterArray = require('./faster-postgres-array'); | |
function parseBool (value) { | |
if (value === null) return value | |
return value === 'TRUE' || | |
value === 't' || | |
value === 'true' || | |
value === 'y' || |
This file contains hidden or 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
var Benchmark = require('benchmark'); | |
import { DynamicModule } from '@nestjs/common'; | |
import { Type } from '@nestjs/common/interfaces/type.interface'; | |
import { randomStringGenerator } from '@nestjs/common/utils/random-string-generator.util'; | |
import { | |
isFunction, isSymbol | |
} from '@nestjs/common/utils/shared.utils'; | |
import { ModuleTokenFactory } from '@nestjs/core/injector/module-token-factory'; | |
import { createHash } from 'crypto'; | |
import stringify from 'fast-safe-stringify'; |
This file was used to perform a performance analysis on object-hash
.
To run, copy all files to a folder, initilize the NPM with npm init
, then install:
npm i --save benchmark object-hash
NewerOlder