Skip to content

change and moved op text #4848

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion locales/en-US/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ TrackNameButton--hide-process =

TrackMemoryGraph--relative-memory-at-this-time = relative memory at this time
TrackMemoryGraph--memory-range-in-graph = memory range in graph
TrackMemoryGraph--operations-since-the-previous-sample = operations since the previous sample
TrackMemoryGraph--allocations-and-deallocations-since-the-previous-sample = allocations and deallocations since the previous sample

## TrackPower
## This is used to show the power used by the CPU and other chips in a computer,
Expand Down
21 changes: 10 additions & 11 deletions src/components/timeline/TrackMemoryGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,17 +384,6 @@ class TrackMemoryGraphImpl extends React.PureComponent<Props, State> {
return (
<Tooltip mouseX={mouseX} mouseY={mouseY}>
<div className="timelineTrackMemoryTooltip">
{operations !== null ? (
<div className="timelineTrackMemoryTooltipLine">
<span className="timelineTrackMemoryTooltipNumber">
{formatNumber(operations, 2, 0)}
</span>
<Localized id="TrackMemoryGraph--operations-since-the-previous-sample">
operations since the previous sample
</Localized>
</div>
) : null}

<div className="timelineTrackMemoryTooltipLine">
<span className="timelineTrackMemoryTooltipNumber">
{formatBytes(bytes)}
Expand All @@ -412,6 +401,16 @@ class TrackMemoryGraphImpl extends React.PureComponent<Props, State> {
memory range in graph
</Localized>
</div>
{operations !== null ? (
<div className="timelineTrackMemoryTooltipLine">
<span className="timelineTrackMemoryTooltipNumber">
{formatNumber(operations, 2, 0)}
</span>
<Localized id="TrackMemoryGraph--allocations-and-deallocations-since-the-previous-sample">
allocations and deallocations since the previous sample
</Localized>
</div>
) : null}
</div>
</Tooltip>
);
Expand Down
12 changes: 6 additions & 6 deletions src/test/components/__snapshots__/TrackMemory.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,29 @@ exports[`TrackMemory has a tooltip that matches the snapshot 1`] = `
<span
class="timelineTrackMemoryTooltipNumber"
>
36
0.000B
</span>
operations since the previous sample
relative memory at this time
</div>
<div
class="timelineTrackMemoryTooltipLine"
>
<span
class="timelineTrackMemoryTooltipNumber"
>
0.000B
2B
</span>
relative memory at this time
memory range in graph
</div>
<div
class="timelineTrackMemoryTooltipLine"
>
<span
class="timelineTrackMemoryTooltipNumber"
>
2B
36
</span>
memory range in graph
allocations and deallocations since the previous sample
</div>
</div>
`;
Expand Down