summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6dbb424)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
12 files changed:
-import { isPrimary } from 'cluster'
+import { isPrimary } from 'node:cluster'
import { ClusterWorker } from '../../lib/index.mjs'
import { executeTaskFunction } from '../benchmarks-utils.mjs'
import { TaskFunctions } from '../benchmarks-types.mjs'
import { ClusterWorker } from '../../lib/index.mjs'
import { executeTaskFunction } from '../benchmarks-utils.mjs'
import { TaskFunctions } from '../benchmarks-types.mjs'
-import { isMainThread } from 'worker_threads'
+import { isMainThread } from 'node:worker_threads'
import { ThreadWorker } from '../../lib/index.mjs'
import { executeTaskFunction } from '../benchmarks-utils.mjs'
import { TaskFunctions } from '../benchmarks-types.mjs'
import { ThreadWorker } from '../../lib/index.mjs'
import { executeTaskFunction } from '../benchmarks-utils.mjs'
import { TaskFunctions } from '../benchmarks-types.mjs'
* @returns {*} The result.
*/
const functionToBench = data => {
* @returns {*} The result.
*/
const functionToBench = data => {
- const crypto = require('crypto')
- const fs = require('fs')
+ const crypto = require('node:crypto')
+ const fs = require('node:fs')
const TaskTypes = {
CPU_INTENSIVE: 'CPU_INTENSIVE',
IO_INTENSIVE: 'IO_INTENSIVE'
const TaskTypes = {
CPU_INTENSIVE: 'CPU_INTENSIVE',
IO_INTENSIVE: 'IO_INTENSIVE'
-const { isMainThread } = require('worker_threads')
+const { isMainThread } = require('node:worker_threads')
const { ThreadWorker } = require('poolifier')
const debug = false
const { ThreadWorker } = require('poolifier')
const debug = false
-import type { Server } from 'http'
-import type { AddressInfo } from 'net'
+import type { Server } from 'node:http'
+import type { AddressInfo } from 'node:net'
import { ClusterWorker } from 'poolifier'
import express, { type Express, type Request, type Response } from 'express'
import { type WorkerData, type WorkerResponse } from './types.js'
import { ClusterWorker } from 'poolifier'
import express, { type Express, type Request, type Response } from 'express'
import { type WorkerData, type WorkerResponse } from './types.js'
-import type { Server } from 'http'
-import type { AddressInfo } from 'net'
+import type { Server } from 'node:http'
+import type { AddressInfo } from 'node:net'
import {
ClusterWorker,
DynamicThreadPool,
import {
ClusterWorker,
DynamicThreadPool,
-import type { TransferListItem } from 'worker_threads'
+import type { TransferListItem } from 'node:worker_threads'
import { DynamicThreadPool, availableParallelism } from 'poolifier'
import { type FastifyPluginCallback } from 'fastify'
import fp from 'fastify-plugin'
import { DynamicThreadPool, availableParallelism } from 'poolifier'
import { type FastifyPluginCallback } from 'fastify'
import fp from 'fastify-plugin'
-import type { TransferListItem } from 'worker_threads'
+import type { TransferListItem } from 'node:worker_threads'
import { DynamicThreadPool, availableParallelism } from 'poolifier'
import { type FastifyPluginCallback } from 'fastify'
import fp from 'fastify-plugin'
import { DynamicThreadPool, availableParallelism } from 'poolifier'
import { type FastifyPluginCallback } from 'fastify'
import fp from 'fastify-plugin'
-import { dirname, extname, join } from 'path'
-import { fileURLToPath } from 'url'
+import { dirname, extname, join } from 'node:path'
+import { fileURLToPath } from 'node:url'
import type { MyData, MyResponse } from './worker'
import {
DynamicThreadPool,
import type { MyData, MyResponse } from './worker'
import {
DynamicThreadPool,
-const { EventEmitter } = require('events')
+const { EventEmitter } = require('node:events')
const { expect } = require('expect')
const sinon = require('sinon')
const {
const { expect } = require('expect')
const sinon = require('sinon')
const {
-const { MessageChannel, Worker } = require('worker_threads')
-const cluster = require('cluster')
+const { MessageChannel, Worker } = require('node:worker_threads')
+const cluster = require('node:cluster')
const { expect } = require('expect')
const { WorkerNode } = require('../../../lib/pools/worker-node')
const { WorkerTypes } = require('../../../lib')
const { expect } = require('expect')
const { WorkerNode } = require('../../../lib/pools/worker-node')
const { WorkerTypes } = require('../../../lib')
-const { randomInt } = require('crypto')
-const { Worker } = require('worker_threads')
-const cluster = require('cluster')
-const os = require('os')
+const { randomInt } = require('node:crypto')
+const { Worker } = require('node:worker_threads')
+const cluster = require('node:cluster')
+const os = require('node:os')
const { expect } = require('expect')
const {
CircularArray,
const { expect } = require('expect')
const {
CircularArray,