import React from 'react'; import Bar from './Bar'; import { List } from 'immutable'; import { percentOf } from 'App/utils'; import SectionWrapper from './SectionWrapper'; import Barwrapper from './Barwrapper'; import { NoContent } from 'UI'; import AnimatedSVG, { ICONS } from 'Shared/AnimatedSVG/AnimatedSVG'; function ResultTimings({ duration, timing }) { const { blocked, connect, dns, queued, receive, send, ssl, wait } = timing; const _dns = Math.max(dns, 0); const _ssl = Math.max(ssl, 0); const _connect = Math.max(connect, 0); const _blocked = Math.max(blocked, 0); const total = parseInt(_blocked + _connect + _dns + queued + receive + send + wait); const blockedStart = queued; const dnsStart = blockedStart + blocked; const connectStart = dnsStart + _dns; const sslStart = connectStart + _connect - _ssl; const sendStart = connectStart + _connect; const waitSrart = sendStart + send; const receiveStart = waitSrart + wait; return (
No Data!
} // animatedIcon="no-results" show={ List.isList(timing)} size="small" >
{dns >= 0 && ( )} {connect >= 0 && ( )} {ssl >= 0 && ( )}
Total
{total} ms
) } export default ResultTimings