diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index ea322d5e..00000000 --- a/.eslintrc +++ /dev/null @@ -1,178 +0,0 @@ -{ - "env": { - "browser": true, - "commonjs": true, - "es2021": true, - "node": true, - "jest": true - }, - "parser": "@typescript-eslint/parser", - "plugins": [ - "import" - ], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:prettier/recommended" - ], - "parserOptions": { - "project": "tsconfig.json", - "sourceType": "module" - }, - "rules": { - "linebreak-style": ["error", "unix"], - "no-empty": 1, - "no-useless-catch": 1, - "no-prototype-builtins": 1, - "no-constant-condition": 0, - "no-useless-escape": 0, - "no-console": "error", - "no-restricted-globals": [ - "error", - { - "name": "global", - "message": "Use `globalThis` instead" - }, - { - "name": "window", - "message": "Use `globalThis` instead" - } - ], - "prefer-rest-params": 0, - "require-yield": 0, - "eqeqeq": ["error", "smart"], - "spaced-comment": [ - "warn", - "always", - { - "line": { - "exceptions": ["-"] - }, - "block": { - "exceptions": ["*"] - }, - "markers": ["/"] - } - ], - "capitalized-comments": [ - "warn", - "always", - { - "ignoreInlineComments": true, - "ignoreConsecutiveComments": true - } - ], - "curly": [ - "error", - "multi-line", - "consistent" - ], - "import/order": [ - "error", - { - "groups": [ - "type", - "builtin", - "external", - "internal", - "index", - "sibling", - "parent", - "object" - ], - "pathGroups": [ - { - "pattern": "@", - "group": "internal" - }, - { - "pattern": "@/**", - "group": "internal" - } - ], - "pathGroupsExcludedImportTypes": [ - "type" - ], - "newlines-between": "never" - } - ], - "@typescript-eslint/no-namespace": 0, - "@typescript-eslint/no-explicit-any": 0, - "@typescript-eslint/explicit-module-boundary-types": 0, - "@typescript-eslint/no-unused-vars": [ - "warn", - { - "varsIgnorePattern": "^_", - "argsIgnorePattern": "^_" - } - ], - "@typescript-eslint/no-inferrable-types": 0, - "@typescript-eslint/no-non-null-assertion": 0, - "@typescript-eslint/no-this-alias": 0, - "@typescript-eslint/no-var-requires": 0, - "@typescript-eslint/no-empty-function": 0, - "@typescript-eslint/no-empty-interface": 0, - "@typescript-eslint/consistent-type-imports": ["error"], - "@typescript-eslint/consistent-type-exports": ["error"], - "no-throw-literal": "off", - "@typescript-eslint/no-throw-literal": "off", - "@typescript-eslint/no-floating-promises": ["error", { - "ignoreVoid": true, - "ignoreIIFE": true - }], - "@typescript-eslint/no-misused-promises": ["error", { - "checksVoidReturn": false - }], - "@typescript-eslint/await-thenable": ["error"], - "@typescript-eslint/naming-convention": [ - "error", - { - "selector": "default", - "format": ["camelCase"], - "leadingUnderscore": "allow", - "trailingUnderscore": "allowSingleOrDouble" - }, - { - "selector": "function", - "format": ["camelCase", "PascalCase"], - "leadingUnderscore": "allow", - "trailingUnderscore": "allowSingleOrDouble" - }, - { - "selector": "variable", - "format": ["camelCase", "UPPER_CASE", "PascalCase"], - "leadingUnderscore": "allow", - "trailingUnderscore": "allowSingleOrDouble" - }, - { - "selector": "parameter", - "format": ["camelCase"], - "leadingUnderscore": "allow", - "trailingUnderscore": "allowSingleOrDouble" - }, - { - "selector": "typeLike", - "format": ["PascalCase"], - "trailingUnderscore": "allowSingleOrDouble" - }, - { - "selector": "enumMember", - "format": ["PascalCase", "UPPER_CASE"] - }, - { - "selector": "objectLiteralProperty", - "format": null - }, - { - "selector": "typeProperty", - "format": null - } - ], - "@typescript-eslint/ban-ts-comment": [ - "error", - { - "ts-ignore": "allow-with-description" - } - ] - } -} diff --git a/.github/workflows/feature.yml b/.github/workflows/feature.yml new file mode 100644 index 00000000..596cfd23 --- /dev/null +++ b/.github/workflows/feature.yml @@ -0,0 +1,19 @@ +name: "CI / Feature" + +on: + push: + branches: + - feature* + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + use-library-js-feature: + permissions: + contents: read + actions: write + checks: write + uses: MatrixAI/.github/.github/workflows/library-js-feature.yml@master diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml deleted file mode 100644 index 72e79432..00000000 --- a/.github/workflows/merge.yml +++ /dev/null @@ -1,144 +0,0 @@ -name: CI / Merge - -on: - push: - branches: - - staging - - feature* - -jobs: - check-lint: - name: "Check / Lint" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Run linting - run: | - npm install - npm run lint - npm run lint-shell - - check-build: - name: "Check / Build" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Run build - run: | - npm install - npm run build --verbose - - check-matrix: - name: "Check / Matrix" - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - steps: - - uses: actions/checkout@v4 - - id: set-matrix - run: | - files=$(find tests/* -maxdepth 0 -type d | sed 's/.*/"&"/' | paste -sd, -) - files=$files,$(find tests/* -maxdepth 0 -type f | grep -e "/*.test.ts" | sed 's/.*/"&"/' | paste -sd, -) - if [ -z "$files" ]; then - echo "matrix={\"shard\":[]}" >> $GITHUB_OUTPUT - else - echo "matrix={\"shard\":[$files]}" >> $GITHUB_OUTPUT - fi - - check-test: - name: "Check / Test" - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: ${{fromJson(needs.check-matrix.outputs.matrix)}} - needs: check-matrix - steps: - - uses: actions/checkout@v4 - - name: Set artifact name - run: echo "SLUG=$(echo ${{ matrix.shard }} | sed 's/[/.]/-/g')" >> $GITHUB_ENV - - name: Run tests - run: | - npm install - npm run test -- \ - --coverageReporters json \ - --coverage \ - "${{ matrix.shard }}" - mv tmp/coverage/coverage-final.json "tmp/coverage/${{ env.SLUG }}.json" - - uses: actions/upload-artifact@v4 - with: - name: coverage-artifacts-${{ env.SLUG }} - path: tmp/coverage/ - - check-coverage: - name: "Check / Coverage" - runs-on: ubuntu-latest - needs: check-test - steps: - - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 - with: - pattern: coverage-artifacts-* - path: tmp/coverage/ - merge-multiple: true - - run: rm .npmrc - - name: Merge coverage results - run: npx nyc merge tmp/coverage/ tmp/coverage/cobertura-coverage.json - - uses: actions/upload-artifact@v4 - with: - name: cobertura-coverage - path: tmp/coverage/cobertura-coverage.json - - build-pull: - name: "Build / Pull Request" - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/staging' - steps: - - uses: actions/checkout@v4 - - name: Create pull request - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - gh pr create \ - --head staging \ - --base master \ - --title "ci: merge staging to master" \ - --body "This is an automatic PR generated by the CI/CD pipeline. This will be automatically fast-forward merged if successful." \ - --assignee "@me" \ - --no-maintainer-edit || true - printf "Pipeline Attempt on $GITHUB_RUN_ID for $GITHUB_SHA\n\n$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \ - | gh pr comment staging \ - --body-file - \ - --repo "$GITHUB_REPOSITORY" - - integration-merge: - name: "Integration / Merge" - runs-on: ubuntu-latest - concurrency: - group: integration-merge - cancel-in-progress: true - needs: - - check-lint - - check-build - - check-test - - build-pull - if: github.ref == 'refs/heads/staging' - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: ${{ secrets.GH_TOKEN }} - - name: Merge into master - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} - GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }} - GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }} - GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }} - run: | - printf "Pipeline Succeeded on $GITHUB_RUN_ID for $GITHUB_SHA\n\n$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \ - | gh pr comment staging \ - --body-file - \ - --repo "$GITHUB_REPOSITORY" - git checkout master - git merge --ff-only "$GITHUB_SHA" - git push origin master diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index af70fa28..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,137 +0,0 @@ -name: CI / Release - -on: - push: - tags: - - v** - -jobs: - check-lint: - name: "Check / Lint" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Run linting - run: | - npm install - npm run lint - npm run lint-shell - - check-build: - name: "Check / Build" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Run build - run: | - npm install - npm run build --verbose - - check-matrix: - name: "Check / Matrix" - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - steps: - - uses: actions/checkout@v4 - - id: set-matrix - run: | - files=$(find tests/* -maxdepth 0 -type d | sed 's/.*/"&"/' | paste -sd, -) - files=$files,$(find tests/* -maxdepth 0 -type f | grep -e "/*.test.ts" | sed 's/.*/"&"/' | paste -sd, -) - if [ -z "$files" ]; then - echo "matrix={\"shard\":[]}" >> $GITHUB_OUTPUT - else - echo "matrix={\"shard\":[$files]}" >> $GITHUB_OUTPUT - fi - - check-test: - name: "Check / Test" - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: ${{fromJson(needs.check-matrix.outputs.matrix)}} - needs: check-matrix - steps: - - uses: actions/checkout@v4 - - name: Set artifact name - run: echo "SLUG=$(echo ${{ matrix.shard }} | sed 's/[/.]/-/g')" >> $GITHUB_ENV - - name: Run tests - run: | - npm install - npm run test -- \ - --coverageReporters json \ - --coverage \ - "${{ matrix.shard }}" - mv tmp/coverage/coverage-final.json "tmp/coverage/${{ env.SLUG }}.json" - - uses: actions/upload-artifact@v4 - with: - name: coverage-artifacts-${{ env.SLUG }} - path: tmp/coverage/ - - check-coverage: - name: "Check / Coverage" - runs-on: ubuntu-latest - needs: check-test - steps: - - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 - with: - pattern: coverage-artifacts-* - path: tmp/coverage/ - merge-multiple: true - - run: rm .npmrc - - name: Merge coverage results - run: npx nyc merge tmp/coverage/ tmp/coverage/cobertura-coverage.json - - uses: actions/upload-artifact@v4 - with: - name: cobertura-coverage - path: tmp/coverage/cobertura-coverage.json - - build-prerelease: - name: "Build / Pre-release" - runs-on: ubuntu-latest - concurrency: - group: build-prerelease - cancel-in-progress: false - needs: - - check-lint - - check-build - - check-test - if: contains(github.ref, '-') - steps: - - uses: actions/checkout@v4 - - name: Run deployment - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: | - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ./.npmrc - echo 'Publishing library prerelease' - npm install - npm publish --tag prerelease --access public - rm -f ./.npmrc - - release-distribution: - name: "Release / Distribution" - runs-on: ubuntu-latest - concurrency: - group: release-distribution - cancel-in-progress: false - needs: - - check-lint - - check-build - - check-test - if: > - !contains(github.ref, '-') - steps: - - uses: actions/checkout@v4 - - name: Publish release - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: | - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ./.npmrc - echo 'Publishing library' - npm install - npm publish --access public - rm -f ./.npmrc - - diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml new file mode 100644 index 00000000..84413deb --- /dev/null +++ b/.github/workflows/staging.yml @@ -0,0 +1,27 @@ +name: "CI / Staging" + +on: + push: + branches: + - staging + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + use-library-js-staging: + permissions: + contents: write + actions: write + checks: write + pull-requests: write + uses: MatrixAI/.github/.github/workflows/library-js-staging.yml@master + secrets: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} + GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }} + GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }} + GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }} + diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 00000000..8965cafc --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,16 @@ +name: "CI / Tag" + +on: + push: + tags: + - 'v*.*.*' + workflow_dispatch: + +jobs: + use-library-js-tag: + permissions: + contents: read + actions: write + uses: MatrixAI/.github/.github/workflows/library-js-tag.yml@master + secrets: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index fa9699b8..00000000 --- a/.prettierrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "semi": true, - "trailingComma": "all", - "singleQuote": true, - "printWidth": 80, - "tabWidth": 2 -} diff --git a/README.md b/README.md index 08be278a..8043b83d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ WebSocket library for TypeScript/JavaScript applications. -This is built on top of the [ws](https://github.com/websockets/ws) library, providing a multiplexed WebStreams API on top of WebSocket. +This is built on top of the [ws](https://github.com/websockets/ws) library, +providing a multiplexed WebStreams API on top of WebSocket. ## Installation @@ -14,12 +15,14 @@ npm install --save @matrixai/ws To use `WebSocketClient` in a browser environment, you will need to polyfill: -* [`buffer`](https://nodejs.org/api/buffer.html) -* [`perf_hooks`](https://nodejs.org/api/perf_hooks.html) +- [`buffer`](https://nodejs.org/api/buffer.html) +- [`perf_hooks`](https://nodejs.org/api/perf_hooks.html) -A good choice for a `buffer` polyfill is [`feross/buffer`](https://github.com/feross/buffer) +A good choice for a `buffer` polyfill is +[`feross/buffer`](https://github.com/feross/buffer) -To polyfill `perf_hooks`, you can alias the `perf_hooks` using your bundler of choice with a file containing the following code: +To polyfill `perf_hooks`, you can alias the `perf_hooks` using your bundler of +choice with a file containing the following code: ```ts const { performance } = globalThis; @@ -66,4 +69,5 @@ git push --tags ## License -js-ws is licensed under Apache-2.0, you may read the terms of the license [here](LICENSE). +js-ws is licensed under Apache-2.0, you may read the terms of the license +[here](LICENSE). diff --git a/benches/suites/baseline_tcp/baseline_tcp_1KiB.ts b/benches/baseline_tcp_1KiB.ts similarity index 88% rename from benches/suites/baseline_tcp/baseline_tcp_1KiB.ts rename to benches/baseline_tcp_1KiB.ts index d5e98bf4..6b2d7b71 100644 --- a/benches/suites/baseline_tcp/baseline_tcp_1KiB.ts +++ b/benches/baseline_tcp_1KiB.ts @@ -1,8 +1,9 @@ -import type { Host } from '../../../src/types.js'; +import type { Host } from '#types.js'; import * as net from 'net'; +import path from 'node:path'; import url from 'node:url'; import b from 'benny'; -import { suiteCommon, summaryName } from '../../utils.js'; +import { suiteCommon } from './utils/utils.js'; import { promise } from '#utils.js'; const filePath = url.fileURLToPath(import.meta.url); @@ -38,7 +39,7 @@ async function main() { // Running benchmark const summary = await b.suite( - summaryName(filePath), + path.basename(filePath, path.extname(filePath)), b.add('send 1KiB of data over tcp', async () => { const prom = promise(); client.write(data1KiB, () => { diff --git a/benches/suites/baseline_websocket/baseline_websocket_1KiB.ts b/benches/baseline_websocket_1KiB.ts similarity index 87% rename from benches/suites/baseline_websocket/baseline_websocket_1KiB.ts rename to benches/baseline_websocket_1KiB.ts index a9e92d15..74b8bfaf 100644 --- a/benches/suites/baseline_websocket/baseline_websocket_1KiB.ts +++ b/benches/baseline_websocket_1KiB.ts @@ -1,11 +1,12 @@ -import type { Host } from '../../../src/types.js'; +import type { Host } from '#types.js'; import type { AddressInfo } from 'net'; import * as https from 'node:https'; +import path from 'node:path'; import url from 'node:url'; import b from 'benny'; import * as ws from 'ws'; -import { suiteCommon, summaryName } from '../../utils.js'; -import * as testsUtils from '../../../tests/utils.js'; +import { suiteCommon } from './utils/utils.js'; +import * as testsUtils from '../tests/utils.js'; import { promise } from '#utils.js'; const filePath = url.fileURLToPath(import.meta.url); @@ -42,7 +43,7 @@ async function main() { // Running benchmark const summary = await b.suite( - summaryName(filePath), + path.basename(filePath, path.extname(filePath)), b.add('send 1KiB of data over ws', async () => { const sendProm = promise(); client.send(data1KiB, { binary: true }, () => { diff --git a/benches/suites/connection/connection_1KiB.ts b/benches/connection_1KiB.ts similarity index 82% rename from benches/suites/connection/connection_1KiB.ts rename to benches/connection_1KiB.ts index 92820834..aef7ac1a 100644 --- a/benches/suites/connection/connection_1KiB.ts +++ b/benches/connection_1KiB.ts @@ -1,12 +1,13 @@ -import type { Host } from '../../../src/types.js'; +import type { Host } from '#types.js'; +import path from 'node:path'; import url from 'node:url'; import b from 'benny'; import Logger, { formatting, LogLevel, StreamHandler } from '@matrixai/logger'; -import { suiteCommon, summaryName } from '../../utils.js'; -import * as events from '../../../src/events.js'; -import * as testsUtils from '../../../tests/utils.js'; -import WebSocketServer from '../../../src/WebSocketServer.js'; -import WebSocketClient from '../../../src/WebSocketClient.js'; +import { suiteCommon } from './utils/utils.js'; +import * as testsUtils from '../tests/utils.js'; +import * as events from '#events.js'; +import WebSocketServer from '#WebSocketServer.js'; +import WebSocketClient from '#WebSocketClient.js'; const filePath = url.fileURLToPath(import.meta.url); @@ -51,7 +52,7 @@ async function main() { // Running benchmark const summary = await b.suite( - summaryName(filePath), + path.basename(filePath, path.extname(filePath)), b.add('send 1KiB of data over connection', async () => { // @ts-ignore: protected property await client.connection.send(data1KiB); diff --git a/benches/index.ts b/benches/index.ts index 786fb5bc..60bece7c 100644 --- a/benches/index.ts +++ b/benches/index.ts @@ -1,50 +1,51 @@ -#!/usr/bin/env ts-node +#!/usr/bin/env tsx -import type { Summary } from 'benny/lib/internal/common-types.js'; import fs from 'node:fs'; import path from 'node:path'; import url from 'node:url'; import si from 'systeminformation'; -import { fsWalk, resultsPath, suitesPath } from './utils.js'; - -const projectPath = path.dirname(url.fileURLToPath(import.meta.url)); +import { benchesPath } from './utils/utils.js'; +import baseline_tcp_1KiB from './baseline_tcp_1KiB.js'; +import baseline_websocket_1KiB from './baseline_websocket_1KiB.js'; +import connection_1KiB from './connection_1KiB.js'; +import stream_1KiB from './stream_1KiB.js'; async function main(): Promise { - await fs.promises.mkdir(path.join(projectPath, 'results'), { + await fs.promises.mkdir(path.join(benchesPath, 'results'), { recursive: true, }); - // Running all suites - for await (const suitePath of fsWalk(suitesPath)) { - // Skip over non-ts and non-js files - const ext = path.extname(suitePath); - if (ext !== '.ts' && ext !== '.js') { - continue; - } - const suite: () => Promise = (await import(suitePath)).default; - await suite(); - } - // Concatenating metrics - const metricsPath = path.join(resultsPath, 'metrics.txt'); + await baseline_tcp_1KiB(); + await baseline_websocket_1KiB(); + await connection_1KiB(); + await stream_1KiB(); + const resultFilenames = await fs.promises.readdir( + path.join(benchesPath, 'results'), + ); + const metricsFile = await fs.promises.open( + path.join(benchesPath, 'results', 'metrics.txt'), + 'w', + ); let concatenating = false; - for await (const metricPath of fsWalk(resultsPath)) { - // Skip over non-metrics files - if (!metricPath.endsWith('_metrics.txt')) { - continue; - } - const metricData = await fs.promises.readFile(metricPath); - if (concatenating) { - await fs.promises.appendFile(metricsPath, '\n'); + for (const resultFilename of resultFilenames) { + if (/.+_metrics\.txt$/.test(resultFilename)) { + const metricsData = await fs.promises.readFile( + path.join(benchesPath, 'results', resultFilename), + ); + if (concatenating) { + await metricsFile.write('\n'); + } + await metricsFile.write(metricsData); + concatenating = true; } - await fs.promises.appendFile(metricsPath, metricData); - concatenating = true; } + await metricsFile.close(); const systemData = await si.get({ cpu: '*', osInfo: 'platform, distro, release, kernel, arch', system: 'model, manufacturer', }); await fs.promises.writeFile( - path.join(projectPath, 'results', 'system.json'), + path.join(benchesPath, 'results', 'system.json'), JSON.stringify(systemData, null, 2), ); } diff --git a/benches/results/baseline_tcp/baseline_tcp_1KiB.json b/benches/results/baseline_tcp/baseline_tcp_1KiB.json deleted file mode 100644 index 021d7995..00000000 --- a/benches/results/baseline_tcp/baseline_tcp_1KiB.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "name": "baseline_tcp.baseline_tcp_1KiB", - "date": "2024-07-04T06:04:57.150Z", - "version": "1.2.0", - "results": [ - { - "name": "send 1KiB of data over tcp", - "ops": 1197455, - "margin": 1.05, - "options": { - "delay": 0.005, - "initCount": 1, - "minTime": 0.05, - "maxTime": 5, - "minSamples": 5 - }, - "samples": 86, - "promise": true, - "details": { - "min": 7.872292145296492e-7, - "max": 0.0000010375294008072029, - "mean": 8.351045249692836e-7, - "median": 8.267533784367521e-7, - "standardDeviation": 4.1459856304821e-8, - "marginOfError": 8.762633312651222e-9, - "relativeMarginOfError": 1.0492858140091537, - "standardErrorOfMean": 4.4707312819649095e-9, - "sampleVariance": 1.7189196848164058e-15, - "sampleResults": [ - 7.872292145296492e-7, - 7.892506364483079e-7, - 7.898806581806893e-7, - 7.941616268239677e-7, - 7.954494113172865e-7, - 7.97732427817448e-7, - 7.982046879850977e-7, - 7.985030735796336e-7, - 7.988529649177274e-7, - 7.995431542999069e-7, - 8.003239260303929e-7, - 8.017153406119765e-7, - 8.027002483700713e-7, - 8.041837929762077e-7, - 8.043388388699162e-7, - 8.066319155541757e-7, - 8.067974231605092e-7, - 8.072310773051848e-7, - 8.079307047500777e-7, - 8.080945824278174e-7, - 8.092207389009624e-7, - 8.095808506200768e-7, - 8.098783297112698e-7, - 8.100404687985097e-7, - 8.112343371623719e-7, - 8.117929524992238e-7, - 8.119039583980131e-7, - 8.121954517230674e-7, - 8.129409257293169e-7, - 8.129562868674325e-7, - 8.135287643588947e-7, - 8.151799441167339e-7, - 8.165870692331574e-7, - 8.179911983855946e-7, - 8.181729316070656e-7, - 8.182966780502949e-7, - 8.21397587075452e-7, - 8.216183017696368e-7, - 8.223921918658802e-7, - 8.250129307668426e-7, - 8.250372527313856e-7, - 8.256941167339335e-7, - 8.263199316982303e-7, - 8.271868251752739e-7, - 8.272235251239958e-7, - 8.27658817137535e-7, - 8.284299786623029e-7, - 8.28946848804719e-7, - 8.295028797869439e-7, - 8.311398789195901e-7, - 8.31249394597951e-7, - 8.314472252972036e-7, - 8.320649115207521e-7, - 8.325505588326607e-7, - 8.347442253958398e-7, - 8.352421106672443e-7, - 8.357226171996274e-7, - 8.358248864930772e-7, - 8.377067836075753e-7, - 8.393710183172928e-7, - 8.401221825520025e-7, - 8.429394683223436e-7, - 8.430268887070639e-7, - 8.431929896841872e-7, - 8.443838093759702e-7, - 8.452584911518162e-7, - 8.498279882024216e-7, - 8.514382570470552e-7, - 8.550274448928904e-7, - 8.568740608506675e-7, - 8.573342750698541e-7, - 8.605336830790458e-7, - 8.654612472124625e-7, - 8.709007075131155e-7, - 8.711753803166718e-7, - 8.730834523439925e-7, - 8.73613407626676e-7, - 8.8209537410742e-7, - 8.826423315740453e-7, - 8.826615648714123e-7, - 8.870778174479976e-7, - 8.978099180183215e-7, - 9.490311562464905e-7, - 9.495302629287828e-7, - 9.826761971095246e-7, - 0.0000010375294008072029 - ] - }, - "completed": true, - "percentSlower": 0 - } - ], - "fastest": { - "name": "send 1KiB of data over tcp", - "index": 0 - }, - "slowest": { - "name": "send 1KiB of data over tcp", - "index": 0 - } -} \ No newline at end of file diff --git a/benches/results/baseline_tcp/baseline_tcp_1KiB_metrics.txt b/benches/results/baseline_tcp/baseline_tcp_1KiB_metrics.txt deleted file mode 100644 index 4cd1449d..00000000 --- a/benches/results/baseline_tcp/baseline_tcp_1KiB_metrics.txt +++ /dev/null @@ -1,8 +0,0 @@ -# TYPE baseline_tcp.baseline_tcp_1KiB_ops gauge -baseline_tcp.baseline_tcp_1KiB_ops{name="send 1KiB of data over tcp"} 1197455 - -# TYPE baseline_tcp.baseline_tcp_1KiB_margin gauge -baseline_tcp.baseline_tcp_1KiB_margin{name="send 1KiB of data over tcp"} 1.05 - -# TYPE baseline_tcp.baseline_tcp_1KiB_samples counter -baseline_tcp.baseline_tcp_1KiB_samples{name="send 1KiB of data over tcp"} 86 diff --git a/benches/results/baseline_tcp/baseline_tcp_1KiB.chart.html b/benches/results/baseline_tcp_1KiB.chart.html similarity index 88% rename from benches/results/baseline_tcp/baseline_tcp_1KiB.chart.html rename to benches/results/baseline_tcp_1KiB.chart.html index abb59da0..ba877ed0 100644 --- a/benches/results/baseline_tcp/baseline_tcp_1KiB.chart.html +++ b/benches/results/baseline_tcp_1KiB.chart.html @@ -5,7 +5,7 @@ - baseline_tcp.baseline_tcp_1KiB + baseline_tcp_1KiB