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

Updating bun to v1.1.42 (latest) #6736

Open
agateblue opened this issue Jan 6, 2025 · 1 comment
Open

Updating bun to v1.1.42 (latest) #6736

agateblue opened this issue Jan 6, 2025 · 1 comment
Labels

Comments

@agateblue
Copy link

I'd like to claim this one is from the open tasks at https://github.com/pubkey/rxdb/blob/master/orga/premium-tasks.md#open-tasks

My first local try give me this:

> bun --version

1.1.42

> bun run test:performance:memory:bun



$ bun run transpile && cross-env DEFAULT_STORAGE=memory bun run ./node_modules/mocha/bin/mocha test_tmp/performance.test.js --bail
$ bun run build:version && node scripts/transpile.mjs && cp ./scripts/module_package.json test_tmp/package.json
$ node ./scripts/update-version-variable.mjs
# transpiling.. (this takes some time on first run)
Successfully compiled 1 file with Babel (6433ms).
Successfully compiled 1 file with Babel (8772ms).
Successfully compiled 3 files with Babel (7330ms).
Successfully compiled 3 files with Babel (9424ms).
Successfully compiled 1 file with Babel (10123ms).
Successfully compiled 4 files with Babel (7425ms).
Successfully compiled 1 file with Babel (11255ms).
Successfully compiled 1 file with Babel (10030ms).
Successfully compiled 13 files with Babel (8355ms).
Successfully compiled 1 file with Babel (10458ms).
Successfully compiled 1 file with Babel (9920ms).
Successfully compiled 1 file with Babel (10463ms).
Successfully compiled 1 file with Babel (10770ms).
Successfully compiled 1 file with Babel (9682ms).
Successfully compiled 2 files with Babel (10451ms).
Successfully compiled 3 files with Babel (11373ms).
Successfully compiled 6 files with Babel (9217ms).
Successfully compiled 1 file with Babel (10469ms).
Successfully compiled 2 files with Babel (10527ms).
Successfully compiled 1 file with Babel (12893ms).
Successfully compiled 1 file with Babel (11518ms).
Successfully compiled 13 files with Babel (10548ms).
Successfully compiled 3 files with Babel (12030ms).
Successfully compiled 1 file with Babel (11997ms).
Successfully compiled 2 files with Babel (12988ms).
Successfully compiled 3 files with Babel (12033ms).
Successfully compiled 1 file with Babel (12793ms).
Successfully compiled 3 files with Babel (12405ms).
Successfully compiled 1 file with Babel (11697ms).
Successfully compiled 6 files with Babel (9275ms).
Successfully compiled 2 files with Babel (10717ms).
Successfully compiled 2 files with Babel (12277ms).
Successfully compiled 1 file with Babel (11860ms).
Successfully compiled 2 files with Babel (12884ms).
Successfully compiled 1 file with Babel (13782ms).
Successfully compiled 1 file with Babel (14053ms).
Successfully compiled 1 file with Babel (12420ms).
Successfully compiled 6 files with Babel (13448ms).
Successfully compiled 2 files with Babel (12827ms).
Successfully compiled 3 files with Babel (11348ms).
Successfully compiled 2 files with Babel (12209ms).
Successfully compiled 3 files with Babel (11415ms).
Successfully compiled 1 file with Babel (13735ms).
Successfully compiled 2 files with Babel (11659ms).
Successfully compiled 3 files with Babel (11215ms).
Successfully compiled 6 files with Babel (15260ms).
Successfully compiled 4 files with Babel (12976ms).
Successfully compiled 2 files with Babel (13164ms).
Successfully compiled 2 files with Babel (12845ms).
Successfully compiled 3 files with Babel (13543ms).
Successfully compiled 3 files with Babel (11470ms).
Successfully compiled 1 file with Babel (14578ms).
Successfully compiled 1 file with Babel (13191ms).
Successfully compiled 2 files with Babel (14024ms).
Successfully compiled 6 files with Babel (14957ms).
Successfully compiled 7 files with Babel (13165ms).
Successfully compiled 3 files with Babel (13597ms).
Successfully compiled 2 files with Babel (13533ms).
Successfully compiled 2 files with Babel (12886ms).
Successfully compiled 5 files with Babel (12832ms).
Successfully compiled 2 files with Babel (13660ms).
Successfully compiled 4 files with Babel (12561ms).
Successfully compiled 1 file with Babel (15496ms).
Successfully compiled 1 file with Babel (15109ms).
Successfully compiled 5 files with Babel (12181ms).
Successfully compiled 2 files with Babel (12192ms).
Successfully compiled 6 files with Babel (13466ms).
Successfully compiled 19 files with Babel (15942ms).
Successfully compiled 4 files with Babel (14172ms).
Successfully compiled 19 files with Babel (16848ms).
Successfully compiled 53 files with Babel (14721ms).
# transpiling DONE (16 CPUs)
DEFAULT_STORAGE: memory
# use RxStorage: memory


  performance.test.ts
    ✔ init storage
    ✔ should not have enabled dev-mode which would affect the performance
runsDone: 0 of 40
runsDone: 1 of 40
runsDone: 2 of 40
runsDone: 3 of 40
runsDone: 4 of 40
runsDone: 5 of 40
runsDone: 6 of 40
runsDone: 7 of 40
runsDone: 8 of 40
runsDone: 9 of 40
runsDone: 10 of 40
runsDone: 11 of 40
runsDone: 12 of 40
runsDone: 13 of 40
runsDone: 14 of 40
runsDone: 15 of 40
runsDone: 16 of 40
runsDone: 17 of 40
runsDone: 18 of 40
runsDone: 19 of 40
runsDone: 20 of 40
runsDone: 21 of 40
runsDone: 22 of 40
runsDone: 23 of 40
runsDone: 24 of 40
runsDone: 25 of 40
runsDone: 26 of 40
runsDone: 27 of 40
runsDone: 28 of 40
runsDone: 29 of 40
runsDone: 30 of 40
runsDone: 31 of 40
runsDone: 32 of 40
runsDone: 33 of 40
runsDone: 34 of 40
runsDone: 35 of 40
runsDone: 36 of 40
runsDone: 37 of 40
runsDone: 38 of 40
runsDone: 39 of 40
Performance test for memory
{
    "description": "memory",
    "platform": "memory",
    "collectionsAmount": 4,
    "docsAmount": 3000,
    "time-to-first-insert": 2.199,
    "insert-documents-500": 0.361,
    "find-by-ids-3000": 7.382,
    "serial-inserts-50": 4.065,
    "serial-find-by-id-50": 1.827,
    "find-by-query": 3.617,
    "find-by-query-parallel-4": 7.05,
    "4x-count": 4.63,
    "property-access": 6.821
}
    ✔ run the performance test (72591ms)
    ✔ exit the process


  4 passing (1m)

> bun run test:performance:memory:bun



> bun run test:bun:dexie

$ bun run transpile && cross-env DEFAULT_STORAGE=dexie NODE_ENV=fast bun run ./node_modules/mocha/bin/mocha test_tmp/unit.test.js --bail
$ bun run build:version && node scripts/transpile.mjs && cp ./scripts/module_package.json test_tmp/package.json
$ node ./scripts/update-version-variable.mjs
# transpiling.. (this takes some time on first run)
Successfully compiled 1 file with Babel (540ms).
Successfully compiled 1 file with Babel (538ms).
# transpiling DONE (16 CPUs)
DEFAULT_STORAGE: dexie
# use RxStorage: dexie
######## init.test.js ########
-------------- RxDB dev-mode warning -------------------------------
you are seeing this because you use the RxDB dev-mode plugin https://rxdb.info/dev-mode.html?console=dev-mode 
This is great in development mode, because it will run many checks to ensure
that you use RxDB correct. If you see this in production mode,
you did something wrong because the dev-mode plugin will decrease the performance.

🤗 Hint: To get the most out of RxDB, check out the Premium Plugins
to get access to faster storages and more professional features: https://rxdb.info/premium?console=dev-mode 

You can disable this warning by calling disableWarnings() from the dev-mode plugin.
---------------------------------------------------------------------
###### PLATFORM: ######
STORAGE: dexie


  init.test.ts
    ✔ ensure dev-mode is activated
    ✔ init storage
    ✔ clear BroadcastChannel tmp folder
    ✔ start test servers

  util.test.js
    .defaultHashSha256()
      ✔ should work with a string
      ✔ should get the same hash twice
      ✔ should work with a very large string
    .recursiveDeepCopy()
time 0.24887100000000828
      ✔ run once
time 0.7978580000000193
      ✔ run once
time 0.22327200000006542
      ✔ run once
    .validateDatabaseName()
      positive
        ✔ should validate a normal string
        ✔ should allow _ and $ after the first character
        ✔ should not allow _ and $ as the first character
        ✔ should validate foldernames
      negative
        ✔ should not validate a spaced string
    .now()
      ✔ should increase the returned value each time
    .appendToArray()
      ✔ should correctly merge the arrays
      ✔ should correctly merge the arrays
    base64 helpers
      ✔ should correctly encode/decode in a circle
      ✔ should be able to decode this big base64
    blob util
      ✔ should be able to run all functions
      ✔ should be able to run often in circle
      ✔ .size() should return a deterministic value
      ✔ should do the correct base64 conversion
      ✔ should work with non latin-1 chars
    .sortDocumentsByLastWriteTime()
      ✔ should sort correctly by lwt
      ✔ should sort correctly by id
    .ensureInteger()
      ✔ should return the given argument in case of integer
      ✔ should throw error for #0 argument
      ✔ should throw error for #1 argument
      ✔ should throw error for #2 argument
      ✔ should throw error for #3 argument
      ✔ should throw error for #4 argument
      ✔ should throw error for #5 argument
      ✔ should throw error for #6 argument
    .batchArray()
      ✔ should split into the correct amounts of batches
    .objectPathMonad()
      ✔ should get the correct values
    .toWithDeleted()
      ✔ should have the _deleted flag set
      ✔ should have _attachments and _meta and _rev removed
    .arrayBufferToString() / .stringToArrayBuffer()
      ✔ should return the correct result
      ✔ #5624 should work with really big strings
    .errorToPlainJson()
      ✔ should return the correct result for an error containing all possible fields
    .randomStringWithSpecialChars()
      ✔ should return a string with an emoji at some point
      ✔ should never create a string the exceeds the length

  custom-index.test.ts
    ✔ should calculate the correct length (84ms)
time: 52.9277239999999
    ✔ should get a correct string (84ms)
    ✔ should get a correct string (83ms)
    ✔ should get a valid string (83ms)
    ✔ should get the correct sort order (84ms)
    ✔ should work correctly on big numbers (84ms)
    ✔ indexing a optional field must work (84ms)
    ✔ Run performance test (234ms)
    ✔ get the correct length
    ✔ issue did not work with this numberValue
    ✔ get the correct id
    ✔ should find the correct docs when comparing with the index
    ✔ should match the correct docs
    ✔ should match the correct docs if bound is undefined
    ✔ should find the correct string for the _deleted+_meta.lwt index

  query-planner.test.js
    ✔ should use the index fields as default sort, if index is provided
    ✔ should use the logical operators if no index is provided
    ✔ should pick the default index when no indexes specified in the schema
    ✔ should respect the given index
    ✔ should have the correct start- and end keys
    ✔ should have the correct start- and end keys when inclusiveStart and inclusiveEnd are false
    ✔ should be true if satisfied
    ✔ should be false if non logic operator is used
    ✔ should be false if non-index field is queried operator is used
    ✔ should prefer the default index over one that has no fields of the query
    ✔ should prefer the index that reduces the read-count by having a non-minimal startKey
    ✔ should prefer the index that matches the sort order, if no selector given
    ✔ should prefer the index that matches the sort order, if selector for both fields is used
    ✔ should prefer indexing over the $eq operator over the $gt operator
    ✔ should have set sortSatisfiedByIndex=false when order is desc

  internal-indexes.test.js
-------------- RxDB Open Core RxStorage -------------------------------
You are using the free Dexie.js based RxStorage implementation from RxDB https://rxdb.info/rx-storage-dexie.html?console=dexie 
While this is a great option, we want to let you know that there are faster storage solutions available in our premium plugins.
For professional users and production environments, we highly recommend considering these premium options to enhance performance and reliability.
 https://rxdb.info/premium?console=dexie 
If you already purchased premium access you can disable this log by calling the setPremiumFlag() function from rxdb-premium/plugins/shared.
---------------------------------------------------------------------
-------------- RxDB Open Core RxStorage -------------------------------
You are using the free Dexie.js based RxStorage implementation from RxDB https://rxdb.info/rx-storage-dexie.html?console=dexie 
While this is a great option, we want to let you know that there are faster storage solutions available in our premium plugins.
For professional users and production environments, we highly recommend considering these premium options to enhance performance and reliability.
 https://rxdb.info/premium?console=dexie 
If you already purchased premium access you can disable this log by calling the setPremiumFlag() function from rxdb-premium/plugins/shared.
---------------------------------------------------------------------
-------------- RxDB Open Core RxStorage -------------------------------
You are using the free Dexie.js based RxStorage implementation from RxDB https://rxdb.info/rx-storage-dexie.html?console=dexie 
While this is a great option, we want to let you know that there are faster storage solutions available in our premium plugins.
For professional users and production environments, we highly recommend considering these premium options to enhance performance and reliability.
 https://rxdb.info/premium?console=dexie 
If you already purchased premium access you can disable this log by calling the setPremiumFlag() function from rxdb-premium/plugins/shared.
---------------------------------------------------------------------
-------------- RxDB Open Core RxStorage -------------------------------
You are using the free Dexie.js based RxStorage implementation from RxDB https://rxdb.info/rx-storage-dexie.html?console=dexie 
While this is a great option, we want to let you know that there are faster storage solutions available in our premium plugins.
For professional users and production environments, we highly recommend considering these premium options to enhance performance and reliability.
 https://rxdb.info/premium?console=dexie 
If you already purchased premium access you can disable this log by calling the setPremiumFlag() function from rxdb-premium/plugins/shared.
---------------------------------------------------------------------
-------------- RxDB Open Core RxStorage -------------------------------
You are using the free Dexie.js based RxStorage implementation from RxDB https://rxdb.info/rx-storage-dexie.html?console=dexie 
While this is a great option, we want to let you know that there are faster storage solutions available in our premium plugins.
For professional users and production environments, we highly recommend considering these premium options to enhance performance and reliability.
 https://rxdb.info/premium?console=dexie 
If you already purchased premium access you can disable this log by calling the setPremiumFlag() function from rxdb-premium/plugins/shared.
---------------------------------------------------------------------
    ✔ should allow to use internal indexes and map them correctly (1987ms)
    ✔ should use the internalIndex in the query planner (1983ms)
    1) should be able to run a query with an internal index explicitly set


  76 passing (4s)
  1 failing

  1) internal-indexes.test.js
       should be able to run a query with an internal index explicitly set:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/agate/projects/rxdb/test_tmp/unit.test.js)
      at tryCatcher (node_modules/bluebird/js/main/util.js:26:22)
      at /home/agate/projects/rxdb/node_modules/bluebird/js/main/promise.js:510:30
      at /home/agate/projects/rxdb/node_modules/bluebird/js/main/promise.js:584:17
      at /home/agate/projects/rxdb/node_modules/bluebird/js/main/promise.js:700:13
      at /home/agate/projects/rxdb/node_modules/bluebird/js/main/async.js:123:15
      at /home/agate/projects/rxdb/node_modules/bluebird/js/main/async.js:133:9
      at /home/agate/projects/rxdb/node_modules/bluebird/js/main/async.js:15:13



error: script "test:bun:dexie" exited with code 1

So in summary:

  • performance tests running as expected (I assume?)
  • one failing test in the dixie suite

I'm not sure if the other suites are part of these task but I'll try to fix the broken test. I'm not sure how long it will take, this is my first time at this codebase (and bun).

Copy link

stale bot commented Jan 13, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon. Please update it or it may be closed to keep our repository organized. The best way is to add some more information or make a pull request with a test case. Also you might get help in fixing it at the RxDB Community Chat If you know you will continue working on this, just write any message to the issue (like "ping") to remove the stale tag.

@stale stale bot added the stale label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant