Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
b3431a6679 | |||
eb65b8fedf | |||
57948890a1 | |||
00191bbeb5 | |||
ed1470365c | |||
c81c8b3ffb | |||
8f676bead7 | |||
b0a6875efb | |||
b25fc0a6e4 | |||
f251a7d0fa | |||
cfdf0267e9 | |||
0c5a88a08f | |||
261f86d664 | |||
b0116a7967 | |||
6dfdfd41b9 |
66
.gitea/workflows/default_nottags.yaml
Normal file
66
.gitea/workflows/default_nottags.yaml
Normal file
@ -0,0 +1,66 @@
|
||||
name: Default (not tags)
|
||||
|
||||
on:
|
||||
push:
|
||||
tags-ignore:
|
||||
- '**'
|
||||
|
||||
env:
|
||||
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
||||
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||
|
||||
jobs:
|
||||
security:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install pnpm and npmci
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
|
||||
- name: Run npm prepare
|
||||
run: npmci npm prepare
|
||||
|
||||
- name: Audit production dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --prod
|
||||
continue-on-error: true
|
||||
|
||||
- name: Audit development dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --dev
|
||||
continue-on-error: true
|
||||
|
||||
test:
|
||||
if: ${{ always() }}
|
||||
needs: security
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Test stable
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm test
|
||||
|
||||
- name: Test build
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm build
|
124
.gitea/workflows/default_tags.yaml
Normal file
124
.gitea/workflows/default_tags.yaml
Normal file
@ -0,0 +1,124 @@
|
||||
name: Default (tags)
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
env:
|
||||
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
||||
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||
|
||||
jobs:
|
||||
security:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Audit production dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --prod
|
||||
continue-on-error: true
|
||||
|
||||
- name: Audit development dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --dev
|
||||
continue-on-error: true
|
||||
|
||||
test:
|
||||
if: ${{ always() }}
|
||||
needs: security
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Test stable
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm test
|
||||
|
||||
- name: Test build
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm build
|
||||
|
||||
release:
|
||||
needs: test
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Release
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm publish
|
||||
|
||||
metadata:
|
||||
needs: test
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
continue-on-error: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Code quality
|
||||
run: |
|
||||
npmci command npm install -g typescript
|
||||
npmci npm install
|
||||
|
||||
- name: Trigger
|
||||
run: npmci trigger
|
||||
|
||||
- name: Build docs and upload artifacts
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
pnpm install -g @gitzone/tsdoc
|
||||
npmci command tsdoc
|
||||
continue-on-error: true
|
@ -12,6 +12,9 @@ stages:
|
||||
- release
|
||||
- metadata
|
||||
|
||||
before_script:
|
||||
- npm install -g @shipzone/npmci
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
@ -26,16 +29,29 @@ mirror:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
audit:
|
||||
auditProductionDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install --production --ignore-scripts
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command npm audit --audit-level=high --only=prod --production
|
||||
tags:
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
auditDevDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install --ignore-scripts
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command npm audit --audit-level=high
|
||||
- npmci command npm audit --audit-level=high --only=dev
|
||||
tags:
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
# ====================
|
||||
# test stage
|
||||
@ -84,10 +100,9 @@ codequality:
|
||||
only:
|
||||
- tags
|
||||
script:
|
||||
- npmci command npm install -g tslint typescript
|
||||
- npmci command npm install -g typescript
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
|
24
.vscode/launch.json
vendored
24
.vscode/launch.json
vendored
@ -2,28 +2,10 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "current file",
|
||||
"type": "node",
|
||||
"command": "npm test",
|
||||
"name": "Run npm test",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"${relativeFile}"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
},
|
||||
{
|
||||
"name": "test.ts",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"test/test.ts"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
"type": "node-terminal"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -6,12 +6,23 @@
|
||||
"gitzone": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "pushrocks",
|
||||
"githost": "code.foss.global",
|
||||
"gitscope": "push.rocks",
|
||||
"gitrepo": "early",
|
||||
"shortDescription": "minimal and fast loading plugin for startup time measuring",
|
||||
"npmPackagename": "@pushrocks/early",
|
||||
"license": "MIT"
|
||||
"description": "A plugin for measuring startup time with minimal performance impact.",
|
||||
"npmPackagename": "@push.rocks/early",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"performance measurement",
|
||||
"startup time",
|
||||
"high resolution timer",
|
||||
"plugin",
|
||||
"typescript",
|
||||
"nodejs"
|
||||
]
|
||||
}
|
||||
},
|
||||
"tsdoc": {
|
||||
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
||||
}
|
||||
}
|
18433
package-lock.json
generated
18433
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
37
package.json
37
package.json
@ -1,38 +1,45 @@
|
||||
{
|
||||
"name": "@pushrocks/early",
|
||||
"version": "4.0.0",
|
||||
"name": "@push.rocks/early",
|
||||
"version": "4.0.4",
|
||||
"private": false,
|
||||
"description": "minimal and fast loading plugin for startup time measuring",
|
||||
"description": "A plugin for measuring startup time with minimal performance impact.",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "(tstest test/)",
|
||||
"build": "(tsbuild --web)"
|
||||
"build": "(tsbuild --web)",
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://gitlab.com/pushrocks/early.git"
|
||||
"url": "https://code.foss.global/push.rocks/early.git"
|
||||
},
|
||||
"keywords": [
|
||||
"preloader"
|
||||
"performance measurement",
|
||||
"startup time",
|
||||
"high resolution timer",
|
||||
"plugin",
|
||||
"typescript",
|
||||
"nodejs"
|
||||
],
|
||||
"author": "Lossless GmbH",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://gitlab.com/pushrocks/early/issues"
|
||||
},
|
||||
"homepage": "https://gitlab.com/pushrocks/early#readme",
|
||||
"homepage": "https://code.foss.global/push.rocks/early",
|
||||
"devDependencies": {
|
||||
"@gitzone/tsrun": "^1.2.31",
|
||||
"@gitzone/tstest": "^1.0.69",
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/tapbundle": "^5.0.2"
|
||||
"@gitzone/tsbuild": "^2.1.66",
|
||||
"@gitzone/tsrun": "^1.2.44",
|
||||
"@gitzone/tstest": "^1.0.77",
|
||||
"@push.rocks/smartdelay": "^3.0.1",
|
||||
"@push.rocks/tapbundle": "^5.0.8",
|
||||
"@types/node": "^20.5.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.60",
|
||||
"@pushrocks/consolecolor": "^2.0.1",
|
||||
"@pushrocks/smartpromise": "^3.1.7"
|
||||
"@push.rocks/consolecolor": "^2.0.1",
|
||||
"@push.rocks/smartpromise": "^4.0.2"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
@ -49,4 +56,4 @@
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
]
|
||||
}
|
||||
}
|
5789
pnpm-lock.yaml
generated
Normal file
5789
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
1
readme.hints.md
Normal file
1
readme.hints.md
Normal file
@ -0,0 +1 @@
|
||||
|
137
readme.md
137
readme.md
@ -1,51 +1,114 @@
|
||||
# @pushrocks/early
|
||||
# @push.rocks/early
|
||||
minimal and fast loading plugin for startup time measuring
|
||||
|
||||
## Availabililty and Links
|
||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/early)
|
||||
* [gitlab.com (source)](https://gitlab.com/pushrocks/early)
|
||||
* [github.com (source mirror)](https://github.com/pushrocks/early)
|
||||
* [docs (typedoc)](https://pushrocks.gitlab.io/early/)
|
||||
## Install
|
||||
|
||||
## Status for master
|
||||
To install `@push.rocks/early`, run the following command in your terminal:
|
||||
|
||||
Status Category | Status Badge
|
||||
-- | --
|
||||
GitLab Pipelines | [](https://lossless.cloud)
|
||||
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
||||
npm | [](https://lossless.cloud)
|
||||
Snyk | [](https://lossless.cloud)
|
||||
TypeScript Support | [](https://lossless.cloud)
|
||||
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
Code Style | [](https://lossless.cloud)
|
||||
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||
Platform support | [](https://lossless.cloud) [](https://lossless.cloud)
|
||||
```bash
|
||||
npm install @push.rocks/early --save
|
||||
```
|
||||
This will add `@push.rocks/early` to your project's dependencies and prepare it for use.
|
||||
|
||||
## Usage
|
||||
|
||||
Use TypeScript for best in class instellisense.
|
||||
In this guide, we'll explore how to use `@push.rocks/early` to measure startup times in your application. This tool is designed to be minimal and fast, providing accurate measurements of how long it takes for parts of your application to load.
|
||||
|
||||
```javascript
|
||||
// Put the following at the start of your module
|
||||
import * as early from 'early';
|
||||
early.start('myModuleName');
|
||||
/*
|
||||
do your loading stuff
|
||||
*/
|
||||
early.stop().then((loadingTime: number) => {
|
||||
// loadingTime in milliseconds
|
||||
}); // stop "early" when your module is ready
|
||||
### Getting Started with `@push.rocks/early`
|
||||
|
||||
First, ensure that your project is set up with TypeScript and that you are familiar with working with ES modules. `@push.rocks/early` is built with TypeScript in mind, offering excellent IntelliSense support in compatible editors.
|
||||
|
||||
#### Importing `@push.rocks/early`
|
||||
|
||||
To begin, import the library into your module:
|
||||
|
||||
```typescript
|
||||
import * as early from '@push.rocks/early';
|
||||
```
|
||||
|
||||
## Contribution
|
||||
#### Starting Measurement
|
||||
|
||||
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
|
||||
The first step in using `@push.rocks/early` is to start the measurement. This should be done as early as possible in your application's startup sequence:
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
```typescript
|
||||
early.start('myModuleName');
|
||||
```
|
||||
Replace `'myModuleName'` with a string identifier for the module or application part you are measuring. This is purely for identification purposes and aids in debugging or logging.
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||
#### Performing Your Loading Operations
|
||||
|
||||
[](https://maintainedby.lossless.com)
|
||||
After starting the measurement, proceed with the operations or loading tasks you wish to measure. This could involve loading modules, reading files, or any setup tasks required for your application to start:
|
||||
|
||||
```typescript
|
||||
// Example loading operations
|
||||
await myModule.initialize();
|
||||
await myOtherModule.loadConfig();
|
||||
```
|
||||
|
||||
#### Stopping Measurement and Retrieving Results
|
||||
|
||||
Once your loading operations are complete, stop the measurement to retrieve the loading time:
|
||||
|
||||
```typescript
|
||||
early.stop().then((loadingTime: number) => {
|
||||
console.log(`Loading time: ${loadingTime} milliseconds`);
|
||||
});
|
||||
```
|
||||
|
||||
This will output the total loading time in milliseconds, giving you a precise measure of the startup performance.
|
||||
|
||||
### Advanced Features
|
||||
|
||||
`@push.rocks/early` allows for more advanced use cases, such as measuring multiple segments individually or in parallel. Each `start` can be matched with a corresponding `stop` to measure different parts of your application independently:
|
||||
|
||||
```typescript
|
||||
early.start('partOne');
|
||||
// Load operations for part one...
|
||||
early.stop().then((time: number) => console.log(`Part one loading time: ${time}`));
|
||||
|
||||
early.start('partTwo');
|
||||
// Load operations for part two...
|
||||
early.stop().then((time: number) => console.log(`Part two loading time: ${time}`));
|
||||
```
|
||||
|
||||
### High Resolution Time Measurement Class
|
||||
|
||||
For more granular control or to measure very short operations, `@push.rocks/early` offers a `HrtMeasurement` class for high-resolution time measurements:
|
||||
|
||||
```typescript
|
||||
import { HrtMeasurement } from '@push.rocks/early';
|
||||
|
||||
const hrtMeasurement = new HrtMeasurement();
|
||||
hrtMeasurement.start();
|
||||
// perform short duration tasks
|
||||
hrtMeasurement.stop();
|
||||
|
||||
console.log(`Operation took ${hrtMeasurement.milliSeconds} milliseconds`);
|
||||
```
|
||||
|
||||
This can be particularly useful for micro-benchmarks or when measuring the performance impact of optimization efforts.
|
||||
|
||||
### Conclusion
|
||||
|
||||
`@push.rocks/early` is a powerful yet minimalistic tool for measuring startup times and performance in Node.js applications. Its straightforward API, coupled with TypeScript support, makes it an excellent choice for developers looking to optimize their applications or simply understand their loading characteristics better.
|
||||
|
||||
By integrating `@push.rocks/early` into your development process, you can gain valuable insights into your application's performance, helping you make informed decisions about optimizations and improvements.
|
||||
|
||||
## License and Legal Information
|
||||
|
||||
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
|
||||
|
||||
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
|
||||
|
||||
### Trademarks
|
||||
|
||||
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
|
||||
|
||||
### Company Information
|
||||
|
||||
Task Venture Capital GmbH
|
||||
Registered at District court Bremen HRB 35230 HB, Germany
|
||||
|
||||
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
|
||||
|
||||
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { expect, expectAsync, tap } from '@pushrocks/tapbundle';
|
||||
import * as smartdelay from '@pushrocks/smartdelay';
|
||||
import { expect, expectAsync, tap } from '@push.rocks/tapbundle';
|
||||
import * as smartdelay from '@push.rocks/smartdelay';
|
||||
|
||||
import * as early from '../ts/index.js'
|
||||
import * as early from '../ts/index.js';
|
||||
|
||||
tap.test('.start()', async () => {
|
||||
process.env.CLI_CALL_MODULENAME = 'early';
|
||||
|
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/early',
|
||||
version: '4.0.4',
|
||||
description: 'minimal and fast loading plugin for startup time measuring'
|
||||
}
|
@ -6,8 +6,8 @@ import * as process from 'process';
|
||||
export class HrtMeasurement {
|
||||
nanoSeconds: number = null;
|
||||
milliSeconds: number = null;
|
||||
private _hrTimeStart = null;
|
||||
private _hrTimeStopDiff = null;
|
||||
private _hrTimeStart: [number, number] = null;
|
||||
private _hrTimeStopDiff: [number, number] = null;
|
||||
private _started: boolean = false;
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
import * as consolecolor from '@pushrocks/consolecolor';
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
import * as consolecolor from '@push.rocks/consolecolor';
|
||||
import * as smartpromise from '@push.rocks/smartpromise';
|
||||
import { HrtMeasurement } from './early.hrtMeasurement.js';
|
||||
|
||||
export { HrtMeasurement };
|
||||
|
@ -1,7 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"experimentalDecorators": true,
|
||||
"useDefineForClassFields": false,
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"moduleResolution": "nodenext"
|
||||
}
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"esModuleInterop": true,
|
||||
"verbatimModuleSyntax": true
|
||||
},
|
||||
"exclude": [
|
||||
"dist_*/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user