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
1 parent
09d7fd6
commit 8af7f7a
Showing
1 changed file
with
54 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Check NAPI-RS features | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build_and_test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
features: | ||
[ | ||
'napi3', | ||
'napi4', | ||
'napi5', | ||
'napi6', | ||
'napi7', | ||
'napi8', | ||
'experimental', | ||
'async', | ||
'chrono_date', | ||
'latin1', | ||
'full', | ||
] | ||
|
||
name: stable - ubuntu-latest | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
|
||
- name: Cache cargo | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
key: stable-check-ubuntu-latest-cargo-cache-features-${{ matrix.features }} | ||
|
||
- name: Check build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: -p napi --no-default-features --features ${{ matrix.features }} |
8af7f7a
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.
Benchmark
noop#napi-rs
58126142
ops/sec (±0.41%
)55481023
ops/sec (±0.26%
)0.95
noop#JavaScript
593669507
ops/sec (±0.09%
)713570183
ops/sec (±0.13%
)1.20
Plus number#napi-rs
20474531
ops/sec (±0.25%
)19272885
ops/sec (±0.76%
)0.94
Plus number#JavaScript
591202142
ops/sec (±0.12%
)710968424
ops/sec (±0.26%
)1.20
Create buffer#napi-rs
331617
ops/sec (±9.45%
)373509
ops/sec (±8.42%
)1.13
Create buffer#JavaScript
1644094
ops/sec (±3.18%
)1949767
ops/sec (±2.45%
)1.19
createArray#createArrayJson
43104
ops/sec (±0.24%
)39567
ops/sec (±0.09%
)0.92
createArray#create array for loop
8087
ops/sec (±0.13%
)7589
ops/sec (±0.11%
)0.94
createArray#create array with serde trait
7991
ops/sec (±0.16%
)7582
ops/sec (±0.11%
)0.95
getArrayFromJs#get array from json string
17605
ops/sec (±0.5%
)17121
ops/sec (±0.12%
)0.97
getArrayFromJs#get array from serde
10400
ops/sec (±0.07%
)10422
ops/sec (±0.09%
)1.00
getArrayFromJs#get array with for loop
12761
ops/sec (±0.22%
)12290
ops/sec (±0.04%
)0.96
Get Set property#Get Set from native#u32
373199
ops/sec (±5.49%
)403219
ops/sec (±5.31%
)1.08
Get Set property#Get Set from JavaScript#u32
309473
ops/sec (±5.39%
)350574
ops/sec (±5.07%
)1.13
Get Set property#Get Set from native#string
340295
ops/sec (±4.96%
)355996
ops/sec (±4.8%
)1.05
Get Set property#Get Set from JavaScript#string
298865
ops/sec (±5.01%
)328445
ops/sec (±5.11%
)1.10
Async task#spawn task
35142
ops/sec (±1.63%
)38189
ops/sec (±1.15%
)1.09
Async task#ThreadSafeFunction
361
ops/sec (±2.73%
)425
ops/sec (±3.28%
)1.18
Async task#Tokio future to Promise
29752
ops/sec (±0.45%
)30242
ops/sec (±0.42%
)1.02
Query#query * 100
2180
ops/sec (±1.75%
)2150
ops/sec (±1.89%
)0.99
Query#query * 1
30330
ops/sec (±2.11%
)30980
ops/sec (±0.45%
)1.02
This comment was automatically generated by workflow using github-action-benchmark.