Skip to content

Commit

Permalink
[pre-commit.ci lite] apply automatic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci-lite[bot] authored May 10, 2023
1 parent 11d9a45 commit 4d49f9f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ const MetricsTooltip = ({
<td className="w-1/4">Value</td>
<td className="w-3/4">
{valueFormatter(highlighted.valuePerSecond, sampleUnit, 5)}{' '}
{highlighted.valuePercentage > 0 &&
{highlighted.valuePercentage > 0 && (
<>({valueFormatter(highlighted.valuePercentage, 'percentage', 2)})</>
}
)}
</td>
</tr>
{delta && (
Expand Down
16 changes: 8 additions & 8 deletions ui/packages/shared/profile/src/MetricsSeries/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ interface MetricsSeriesProps {

const MetricsSeries = ({data, line, color, strokeWidth}: MetricsSeriesProps): JSX.Element => (
<g className="line-group">
<path
<path
className="line"
d={line(data.values) ?? undefined}
style={{
stroke: color,
d={line(data.values) ?? undefined}
style={{
stroke: color,
strokeWidth,
}}
/>
</g>
);
}}
/>
</g>
);

export default MetricsSeries;
25 changes: 16 additions & 9 deletions ui/packages/shared/profile/src/ProfileMetricsGraph/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,15 @@ export const useQueryRange = (

const stepDuration = getStepDuration(start, end);

const call = client.queryRange( {
query: queryExpression,
start: Timestamp.fromDate(new Date(start)),
end: Timestamp.fromDate(new Date(end)),
step: Duration.create(stepDuration),
limit: 0,
filterQuery: filterByFunction,
},
const call = client.queryRange(
{
query: queryExpression,
start: Timestamp.fromDate(new Date(start)),
end: Timestamp.fromDate(new Date(end)),
step: Duration.create(stepDuration),
limit: 0,
filterQuery: filterByFunction,
},
{meta: metadata}
);
call.response
Expand All @@ -96,7 +97,13 @@ const ProfileMetricsGraph = ({
addLabelMatcher,
onPointClick,
}: ProfileMetricsGraphProps): JSX.Element => {
const {isLoading, response, error} = useQueryRange(queryClient, queryExpression, from, to, filterByFunction);
const {isLoading, response, error} = useQueryRange(
queryClient,
queryExpression,
from,
to,
filterByFunction
);
const isLoaderVisible = useDelayedLoader(isLoading);
const {loader, onError, perf} = useParcaContext();

Expand Down
2 changes: 1 addition & 1 deletion ui/packages/shared/utilities/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const unitsInCount = {
};

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

const knownValueFormatters = {
Expand Down

0 comments on commit 4d49f9f

Please sign in to comment.