MCPcopy Index your code
hub / github.com/getsentry/sentry / formatSamplingRateValue

Function formatSamplingRateValue

static/gsAdmin/views/dynamicSamplingPanel.tsx:330–338  ·  view source on GitHub ↗
(samplingValue: any)

Source from the content-addressed store, hash-verified

328 const round = (value: number) => Math.round(value * 10000) / 10000;
329
330 const formatSamplingRateValue = (samplingValue: any) => {
331 if (
332 samplingValue.type === 'sampleRate' ||
333 samplingValue.type === 'minimumSampleRate'
334 ) {
335 return `${round(samplingValue.value * 100)}%`;
336 }
337 return `* ${round(samplingValue.value)}`;
338 };
339
340 const evaluateRuleImpact = (rule: RuleV2) => {
341 if (getRuleType(rule) === RuleType.BOOST_LOW_VOLUME_PROJECTS) {

Callers 1

Calls 1

roundFunction · 0.85

Tested by

no test coverage detected