-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
48 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 1 addition & 8 deletions
9
...r/src/commonMain/kotlin/io/github/optimumcode/json/schema/internal/hostname/Normalizer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,3 @@ | ||
package io.github.optimumcode.json.schema.internal.hostname | ||
|
||
import doist.x.normalize.Form | ||
import doist.x.normalize.normalize | ||
|
||
internal object Normalizer { | ||
fun isNormalized(label: String): Boolean { | ||
return label.normalize(Form.NFC) == label | ||
} | ||
} | ||
internal expect fun isNormalized(label: String): Boolean |
8 changes: 8 additions & 0 deletions
8
...JsMain/kotlin/io/github/optimumcode/json/schema/internal/hostname/Normalizer.nonWasmJs.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package io.github.optimumcode.json.schema.internal.hostname | ||
|
||
import doist.x.normalize.Form | ||
import doist.x.normalize.normalize | ||
|
||
internal actual fun isNormalized(label: String): Boolean { | ||
return label.normalize(Form.NFC) == label | ||
} |
3 changes: 3 additions & 0 deletions
3
...asmJsMain/kotlin/io/github/optimumcode/json/schema/internal/hostname/Normalizer.wasmJs.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package io.github.optimumcode.json.schema.internal.hostname | ||
|
||
internal actual fun isNormalized(label: String): Boolean = js("label.normalize('NFC') === label") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e1770b3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark 'KMP JSON schema validator'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
1.50
.macosX64.CommonAvgTimeBench.validateBasic ( {"objectPath":"openapi.json","schemaPath":"openapi_schema.json"} )
4306.773060677966
us/op2656.9748599462364
us/op1.62
macosX64.CommonAvgTimeBench.validateBasic ( {"objectPath":"openapi-invalid.json","schemaPath":"openapi_schema.json"} )
4296.92980204918
us/op2765.1261474860335
us/op1.55
macosX64.CommonAvgTimeBench.validateDetailed ( {"objectPath":"openapi.json","schemaPath":"openapi_schema.json"} )
9029.220563709678
us/op6019.334005294117
us/op1.50
This comment was automatically generated by workflow using github-action-benchmark.
CC: @OptimumCode