-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathMetrics.js
More file actions
29 lines (27 loc) · 832 Bytes
/
Metrics.js
File metadata and controls
29 lines (27 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import React from 'react'
import { ComponentTime } from './ComponentTime'
/**
This component contains the performance measures of React components in Circular loader .
*/
export function Metrics(props) {
return (
<React.Fragment>
<div className="component-progress-container">
<h1 className="overview">Overview</h1>
<ul className="ctime">
{props.measures.map((measure, index) => {
return (
<li key={measure.componentName}>
<ComponentTime
componentname={measure.componentName}
percentage={parseInt(measure.percentTimeSpent)}
msec={Number(measure.totalTimeSpent.toFixed(2))}
/>
</li>
)
})}
</ul>
</div>
</React.Fragment>
)
}