Skip to content

Commit

Permalink
fix: sort
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing committed Oct 9, 2023
1 parent 3bfe822 commit 60e45cb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ import Bench from './bench';
import tTable from './constants';
import { createBenchEvent } from './event';
import { AddEventListenerOptionsArgument, RemoveEventListenerOptionsArgument } from './types';
import {
getMean, getVariance, isAsyncTask, sort,
} from './utils';
import { getMean, getVariance, isAsyncTask } from './utils';

/**
* A class that represents each benchmark task in Tinybench. It keeps track of the
Expand Down Expand Up @@ -115,7 +113,7 @@ export default class Task extends EventTarget {
await this.bench.teardown(this, 'run');

if (!this.result?.error) {
samples.sort(sort);
samples.sort((a, b) => a - b);

const period = totalTime / this.runs;
const hz = 1000 / period;
Expand Down

0 comments on commit 60e45cb

Please sign in to comment.