Skip to content
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

Format and signify mathlib instructions count by absolute value #355

Merged
merged 1 commit into from
Oct 11, 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: 2 additions & 0 deletions backend/backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@
</executions>
<configuration>
<dotGitDirectory>${project.basedir}/../../.git</dotGitDirectory>
<failOnUnableToExtractRepoInfo>false</failOnUnableToExtractRepoInfo>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties
</generateGitPropertiesFilename>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ public Optional<SignificanceReasons> getSignificance(Run run, Collection<Run> co
}

private boolean isSignificantDifference(DimensionDifference diff) {
if (diff.getDimension().getBenchmark().startsWith("~"))
// 1B instructions
return diff.getDiff() >= 1_000_000_000;

boolean relSignificant = diff.getReldiff()
.map(reldiff -> Math.abs(reldiff) >= significanceFactors.getRelativeThreshold())
// There is no reldiff if the first value is 0. But if the second value is also zero, that
Expand Down
2 changes: 2 additions & 0 deletions backend/runner/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
</executions>
<configuration>
<dotGitDirectory>${project.basedir}/../../.git</dotGitDirectory>
<failOnUnableToExtractRepoInfo>false</failOnUnableToExtractRepoInfo>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties
</generateGitPropertiesFilename>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/comparison/RunComparisonTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import { Prop } from 'vue-property-decorator'
const numberFormat: Intl.NumberFormat = new Intl.NumberFormat(
new Intl.NumberFormat().resolvedOptions().locale,
{ maximumFractionDigits: 3 }
{ maximumFractionDigits: 3, notation: 'compact' }
)
class TableItem {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/rundetail/MeasurementsDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ import { vxm } from '@/store'
const numberFormat: Intl.NumberFormat = new Intl.NumberFormat(
new Intl.NumberFormat().resolvedOptions().locale,
{ maximumFractionDigits: 3 }
{ maximumFractionDigits: 3, notation: 'compact' }
)
class Item {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/runs/RunSignificanceChips.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

const numberFormat: Intl.NumberFormat = new Intl.NumberFormat(
new Intl.NumberFormat().resolvedOptions().locale,
{ maximumFractionDigits: 1 }
{ maximumFractionDigits: 1, notation: 'compact' }
)

const iconMappings = {
Expand Down Expand Up @@ -102,9 +102,9 @@

this.change = change
} else {
this.change = difference.relDiff
this.change = difference.relDiff && !this.id.benchmark.startsWith('~')

Check warning on line 105 in frontend/src/components/runs/RunSignificanceChips.vue

View workflow job for this annotation

GitHub Actions / build-frontend

Insert `⏎·······`
? this.formatPercentage(difference.relDiff)

Check warning on line 106 in frontend/src/components/runs/RunSignificanceChips.vue

View workflow job for this annotation

GitHub Actions / build-frontend

Insert `··`
: this.formatNumber(difference.absDiff)

Check warning on line 107 in frontend/src/components/runs/RunSignificanceChips.vue

View workflow job for this annotation

GitHub Actions / build-frontend

Insert `··`
}
this.color = this.changeColor(
difference.absDiff,
Expand Down
Loading