Coder Social home page Coder Social logo

doomsower / react-native-startup-time Goto Github PK

View Code? Open in Web Editor NEW
114.0 3.0 13.0 452 KB

measure startup time of your react-native app

License: MIT License

JavaScript 23.71% Java 26.93% Ruby 13.61% Objective-C 26.23% Starlark 9.52%
react-native benchmark debug profiling startup measurement optimization

react-native-startup-time's Issues

Issue with Android metrics when OS kills activity

Hi!

We've discovered another issue where we're seeing unrealistic high numbers for Android (we're talking multiple minutes).

If I understand the lifecycle mechanics of Android correctly, I believe there will be cases where the app is pushed to the background and the Android OS will clean up the Activity context while the Application context is still available. When the app is later returned to the foreground, the Activity context (which will execute any JavaScript calling the API for getting startup time data) gets re-created. Since the Application context was still available, the new calculation will be based on the old timestamp generated when the Application context was created.

This means that the concept of startup time is a bit more complex in the Android domain compared to on iOS. One need to distinguish between "hot" case (Application context is already available, Activity gets created) and "cold" case (Application context needs to be created, Activity gets created). The "unified" way to treat startup time between platforms would be to only care about the "cold" case.

One way of resolving this could be to only calculate and resolve the value once from the native side. Subsequent calls would then either return the same value or reject the call (allowing conditional reporting on the JavaScript side of things).

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Application load time issue with iOS ver 15 or above

We have been facing lots of unrealistic app load times in our mobile application for iOS users. As per our investigation, it is commonly occurring in the iOS version 15 or above. We have also tested with the lower version of iOS but it was working fine for them. I think we need to make some updates to the package as the latest version of the package is 2.0.0 which was launched 10 months ago and iOS 15 was launched on 20th Sep 2021. Could you please suggest?

How can I properly use this?

I am using vscode. I don't use android studio at all, but the instructions are strictly for android studio it seems. I didn't see anyone who use android studio for that anyway. You don't even use anything related with android studio much in react. You don't need it. This is javascript anyway, android studio has nothing to do with this. Even in youtube tutorials none uses android studio for that.

Anyway here s what I did and what didn't work.

import { StartupTime } from 'react-native-startup-time';
...

<StartupTime
ready={true /* optional, defaults to true /}
style={styles.startupTime /
optional*/}
/>
a=StartupTime

console.log(a)


import { getTimeSinceStartup } from 'react-native-startup-time';

// when you app is ready:
getTimeSinceStartup().then((time) => {
console.log(Time since startup: ${time} ms);
});
a=getTimeSinceStartup()

console.log(a)


Both returns null. I tried various things, its just a small thing I didn't expect it give so much errors at start. That's why I think a little more documentation would be good. I even copy pasted that and it still doesn't work.

Can not run in vs code, and instructions not clear enough

I tried everything but this just doesn't work. Your docs isn't very clear. No good example aswell. Tried putting that function into a variable but it doesn't work. Console log doesn't work. Nothing works. I literally wasted a lot of time with this.

Issue with Android KitKat

Hi!
We tried out the package while implementing performance instrumentation but ran into issues with the following exception:
uid xxxxx does not have android.permission.UPDATE_DEVICE_STATS.

Affected OS versions seem to be KitKat (as has been reported by other users of reportFullyDrawn()) and when going through the implementation, I noticed the check for that specific range of versions. However, the check seem to include KitKat - should it not be
>= Build.VERSION_CODES.LOLLIPOP
instead?

Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.