Skip to content

Commit

Permalink
Merge pull request #355 from IPDSnelting/abs-instr
Browse files Browse the repository at this point in the history
Format and signify mathlib instructions count by absolute value
  • Loading branch information
Kha authored Oct 11, 2023
2 parents a27c410 + f1b54be commit 54874bc
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
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 @@ import { Prop } from 'vue-property-decorator'
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,7 +102,7 @@ class RelevantChange {
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 `··`
}
Expand Down

0 comments on commit 54874bc

Please sign in to comment.