Skip to content

Commit

Permalink
ui/packages/shared: Remove percentage unit
Browse files Browse the repository at this point in the history
  • Loading branch information
metalmatze committed May 11, 2023
1 parent 4d49f9f commit d60be3e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ const MetricsTooltip = ({
<td className="w-1/4">Value</td>
<td className="w-3/4">
{valueFormatter(highlighted.valuePerSecond, sampleUnit, 5)}{' '}
{highlighted.valuePercentage > 0 && (
<>({valueFormatter(highlighted.valuePercentage, 'percentage', 2)})</>
)}
</td>
</tr>
{delta && (
Expand Down
5 changes: 0 additions & 5 deletions ui/packages/shared/utilities/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,10 @@ const unitsInCount = {
exa: {divisor: 1e18, symbol: 'E'},
};

const percentage = {
percentage: {divisor: 0.01, symbol: '%'}, // dividing by 0.01 is like multiplying by 100.
};

const knownValueFormatters = {
bytes: unitsInBytes,
nanoseconds: unitsInTime,
count: unitsInCount,
percentage,
};

export const valueFormatter = (num: number, unit: string, digits: number): string => {
Expand Down

0 comments on commit d60be3e

Please sign in to comment.