updates snapshots and removes extra formatting from formatTime
Subhan committed
May 8, 2019 at 23:33 UTC
34a38dc4f0b76866b1403240f0c6812ab773b734
2 files changed
+9
-9
src/__tests__/__snapshots__/profilingCharts-test.js.snap
+8
-8
@@ -61,7 +61,7 @@ Object {
61
"actualDuration": 14,
62
"didRender": true,
63
"id": 2,
64
- "label": "Parent (10.0ms of 14.0ms)",
64
+ "label": "Parent (10ms of 14ms)",
65
"name": "Parent",
66
"offset": 0,
67
"selfDuration": 10,
@@ -73,7 +73,7 @@ Object {
73
"actualDuration": 2,
74
"didRender": true,
75
"id": 4,
76
- "label": "Memo(Child) key=\\"second\\" (2.0ms of 2.0ms)",
76
+ "label": "Memo(Child) key=\\"second\\" (2ms of 2ms)",
77
"name": "Memo(Child)",
78
"offset": 12,
79
"selfDuration": 2,
@@ -83,7 +83,7 @@ Object {
83
"actualDuration": 2,
84
"didRender": true,
85
"id": 3,
86
- "label": "Memo(Child) key=\\"first\\" (2.0ms of 2.0ms)",
86
+ "label": "Memo(Child) key=\\"first\\" (2ms of 2ms)",
87
"name": "Memo(Child)",
88
"offset": 10,
89
"selfDuration": 2,
@@ -155,7 +155,7 @@ Object {
155
"actualDuration": 10,
156
"didRender": true,
157
"id": 2,
158
- "label": "Parent (10.0ms of 10.0ms)",
158
+ "label": "Parent (10ms of 10ms)",
159
"name": "Parent",
160
"offset": 0,
161
"selfDuration": 10,
@@ -253,19 +253,19 @@ Object {
253
"nodes": Array [
254
Object {
255
"id": 2,
256
- "label": "Parent (10.0ms)",
256
+ "label": "Parent (10ms)",
257
"name": "Parent",
258
"value": 10,
259
},
260
Object {
261
"id": 3,
262
- "label": "Memo(Child) key=\\"first\\" (2.0ms)",
262
+ "label": "Memo(Child) key=\\"first\\" (2ms)",
263
"name": "Memo(Child)",
264
"value": 2,
265
},
266
Object {
267
"id": 4,
268
- "label": "Memo(Child) key=\\"second\\" (2.0ms)",
268
+ "label": "Memo(Child) key=\\"second\\" (2ms)",
269
"name": "Memo(Child)",
270
"value": 2,
271
},
@@ -324,7 +324,7 @@ Object {
324
"nodes": Array [
325
Object {
326
"id": 2,
327
- "label": "Parent (10.0ms)",
327
+ "label": "Parent (10ms)",
328
"name": "Parent",
329
"value": 10,
330
},
src/devtools/views/Profiler/utils.js
+1
-1
@@ -61,7 +61,7 @@ export const formatDuration = (duration: number) =>
61
export const formatPercentage = (percentage: number) =>
62
Math.round(percentage * 100);
63
export const formatTime = (timestamp: number) =>
64
- Math.round(Math.round(timestamp) / 100) / 10 || '<0.1';
64
+ Math.round(Math.round(timestamp) / 100) / 10;
65
66
export const scale = (
67
minValue: number,