Home / File/ benchmark.js — react Source File

benchmark.js — react Source File

Architecture documentation for benchmark.js, a javascript file in the react codebase.

Entity Profile

Source Code

(function () {
  'use strict';

  const e = React.createElement;

  function timeAge(time) {
    const now = new Date().getTime() / 1000;
    const minutes = (now - time) / 60;

    if (minutes < 60) {
      return Math.round(minutes) + ' minutes ago';
    }
    return Math.round(minutes / 60) + ' hours ago';
  }

  function getHostUrl(url) {
    return (url + '')
      .replace('https://', '')
      .replace('http://', '')
      .split('/')[0];
  }

  function HeaderBar() {
    return e(
      'tr',
      {
        style: {
          backgroundColor: '#222',
        },
      },
      e(
        'table',
        {
          style: {
            padding: 4,
          },
          width: '100%',
          cellSpacing: 0,
          cellPadding: 0,
        },
        e(
          'tbody',
          null,
          e(
            'tr',
            null,
            e(
              'td',
              {
                style: {
                  width: 18,
                  paddingRight: 4,
                },
              },
              e(
                'a',
                {
                  href: '#',
                },
                e('img', {
// ... (256 more lines)

Frequently Asked Questions

What does benchmark.js do?
benchmark.js is a source file in the react codebase, written in javascript.
Where is benchmark.js in the architecture?
benchmark.js is located at scripts/bench/benchmarks/hacker-news/benchmark.js (directory: scripts/bench/benchmarks/hacker-news).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free