Skip to content

Commit

Permalink
chore: deps
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Jul 19, 2024
1 parent 340c16d commit 7258651
Show file tree
Hide file tree
Showing 5 changed files with 615 additions and 569 deletions.
2 changes: 1 addition & 1 deletion scripts/cannon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ yarn tsn cannon
*/

import { pDelay, _randomInt } from '@naturalcycles/js-lib'
import { _randomInt, pDelay } from '@naturalcycles/js-lib'
import { expressFunctionFactory, runCannonScript } from '../src'

runCannonScript(
Expand Down
2 changes: 1 addition & 1 deletion scripts/demoCannon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ yarn tsn demoCannon
*/

import { pDelay, _randomInt } from '@naturalcycles/js-lib'
import { _randomInt, pDelay } from '@naturalcycles/js-lib'
import { expressFunctionFactory, runCannonScript } from '../src'

runCannonScript(
Expand Down
6 changes: 3 additions & 3 deletions src/bench.util.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { pDefer, _range } from '@naturalcycles/js-lib'
import { dimGrey, yellow, runScript, fs2 } from '@naturalcycles/nodejs-lib'
import { _range, pDefer } from '@naturalcycles/js-lib'
import { dimGrey, fs2, runScript, yellow } from '@naturalcycles/nodejs-lib'
import type { Event, Suite } from 'benchmark'
import Benchmark from 'benchmark'
import { plotAsciiChart } from './asciiChart.util'
Expand Down Expand Up @@ -37,7 +37,7 @@ export async function runBench(opt: RunBenchOptions): Promise<HertzMap> {
let total = 0
results.forEach(map => (total += map[name]!))
avg[name] = total / runs
if (avg[name]! > 2) avg[name] = Math.round(avg[name]!)
if (avg[name] > 2) avg[name] = Math.round(avg[name])
})

console.log('\n\n')
Expand Down
6 changes: 3 additions & 3 deletions src/cannon.util.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { AddressInfo } from 'node:net'
import { pDefer, pDelay, StringMap, _omit, _range } from '@naturalcycles/js-lib'
import { runScript, boldRed, dimGrey, yellow, fs2 } from '@naturalcycles/nodejs-lib'
import { _omit, _range, pDefer, pDelay, StringMap } from '@naturalcycles/js-lib'
import { boldRed, dimGrey, fs2, runScript, yellow } from '@naturalcycles/nodejs-lib'
import type {
AutocannonResult,
AutocannonSummary,
Expand Down Expand Up @@ -68,7 +68,7 @@ export async function runCannon(

for await (const profileName of Object.keys(profiles)) {
resultByProfile[profileName] = await runCannonProfile(profileName, profiles[profileName]!, opt)
const summary = toSummary(profileName, resultByProfile[profileName]!)
const summary = toSummary(profileName, resultByProfile[profileName])
if (!opt.includeLatencyPercentiles) {
_omit(summary, ['latency50', 'latency90', 'latency99'], true)
}
Expand Down
Loading

0 comments on commit 7258651

Please sign in to comment.