INNER CODE UNIT · TypeScript

middle

hasura/graphql-bench · app/queries/src/executors/k6/index.ts:352

    const middle = Math.floor(sorted.length / 2);

    if (sorted.length % 2 === 0) {
        return (sorted[middle - 1] + sorted[middle]) / 2;
    }

    return sorted[middle];
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…