Commit Graph

16 Commits

Author SHA1 Message Date
Michel Weststrate
989b32c7b9 only capture selected application in exports
Summary:
Currently flipper export exports all connected the clients. This causes a few problems

1. This might often be unintended by the user, causing accidentally sharing (sensitive) information in the trace
2. This slows down things unnecesary. Especially if there is connected application, which is expensive, but not needed. See the attached video for the impact on exporting flipper: Export size reduzed from 11 to 0.5 mb. Export time from 20 seconds down to 1. (Flipper might not be a representative example, but imagine working on fb4a and having instagram on the emulator as well).

Reviewed By: priteshrnandgaonkar

Differential Revision: D18448194

fbshipit-source-id: f4de4c6dd89bda20251eb5f7423f7996339c8f2d
2019-11-13 08:36:55 -08:00
Pritesh Nandgaonkar
f4a42cc4ea Add more telemetry events
Summary:
Added more telemetry events for the following events

- Time taken for each plugin to fetch meta data
- Overall time taken for fetching all meta data
- Overall time taken for serializing plugins
- Time taken to serialize individual plugins with overridden serializer and deserializer methods

Reviewed By: passy

Differential Revision: D18349588

fbshipit-source-id: 2b3a6b663a9df4da45580fc0be5651a27ca4093d
2019-11-08 05:05:02 -08:00
Pritesh Nandgaonkar
f6e00136ba Add telemetry for export time and selected plugins
Summary: Adds telemetry for the export time and also logs the selected plugins.

Reviewed By: jknoxville

Differential Revision: D18244843

fbshipit-source-id: 36a3e8b9b456b59187918d19075a2c1ea0caef25
2019-10-31 09:40:51 -07:00
Pritesh Nandgaonkar
e73381a85c JSON.stringify over custom serializer
Summary: This diff calls JSON.stringify on the final export object instead of the custom serializer. As the custom serializer is slower, because it has to check for different types on its children before serializing it. Which adds to the complexity. The time gain which we get is 3x, that is with this change the export is 3 times faster. We required custom serializer, because the logs had `Date` which is not serializable. So that is being taken care while importing it.

Reviewed By: jknoxville

Differential Revision: D18171202

fbshipit-source-id: cd1b59b74dabb4c35a032dc7b54f183a68e37823
2019-10-29 13:47:01 -07:00
Pritesh Nandgaonkar
f49745448c Pass the status Msg as an argument
Summary: Before this diff whenever one called serialize method it showed `Serializing Flipper  ` msg without showing the explicit details of which data we are serializing. Thus with this diff one can pass the status msg as an argument which will be displayed while serializing.

Reviewed By: jknoxville

Differential Revision: D18173024

fbshipit-source-id: a4e7e073498993626204061d4e774099f00b8c5a
2019-10-29 13:47:00 -07:00
Pascal Hartig
874e590b96 Upgrade eslint and prettier
Summary: Not a fan of the long lines, but if that's where prettier is going, let's roll with it.

Reviewed By: jknoxville

Differential Revision: D17905599

fbshipit-source-id: c4232d46d2ec0b7c743f6afd8349106c85f013b9
2019-10-14 05:27:27 -07:00
Andres Suarez
0675dd924d Tidy up Flipper license headers [1/2]
Reviewed By: passy

Differential Revision: D17863711

fbshipit-source-id: 259dc77826fb803ff1b88c88529d7f679d3b74d8
2019-10-11 13:46:45 -07:00
Pritesh Nandgaonkar
e0e0a8f916 Add device argument in the constructor of Client
Summary: Property `device` on Clients for archived device never resolve. As it gets resolved when `addConnection` is called which happens for real non-offline devices. To get around this, I have added an argument to the constructor of the Client, as for offline case we can construct the device before client and can pass it as an argument.

Reviewed By: jknoxville

Differential Revision: D17831261

fbshipit-source-id: a14fb0b65343cccac731077e983026388611d323
2019-10-10 08:22:52 -07:00
Pritesh Nandgaonkar
7f2f2febcf Make MobileConfig plugin exportable
Summary: As per title, this diff makes the Mobile config plugin exportable. This involves moving the important property from `State` to `PersistedState`. Also had to implement the `exportPersistedState` function to fetch the experiments information for the Universes, configs and gatekeeper information.

Reviewed By: danielbuechele

Differential Revision: D17633986

fbshipit-source-id: 604225ba47112620bee0a6c704416b3ac350de9c
2019-10-07 09:57:31 -07:00
Pritesh Nandgaonkar
6e6873a4f6 Pass idler and statusupdate callback as an argument to the export persisted state function
Summary: This diff passes the idler and statusUpdate arguments to the export persisted state, as it is being used in the MobileConfig's export function

Reviewed By: passy

Differential Revision: D17715815

fbshipit-source-id: 98a0f0f5950254de2139c4aaa52cb73401c86c3c
2019-10-04 05:33:44 -07:00
Pritesh Nandgaonkar
d8cd69666e Strictify exportData.tsx
Summary: As per title.

Reviewed By: jknoxville

Differential Revision: D17269583

fbshipit-source-id: efb67acade677f26ce3d2a547d0ab97329d80196
2019-09-10 08:50:28 -07:00
Pritesh Nandgaonkar
566f2bf96e Do not use custom serializer for all the plugins
Summary:
This diff solves the problem where the export for the graphql plugin was super super super sloooooowwww...... The reason being that the graphql plugin had chunky graphql responses which were json blob which was being serialized by our custom serializer. Instead of serializing those with custom serializer we can directly serialize them as they won't have any map's, sets, classes etc.

This diff adds the two static functions on the plugin which will provide the serialized and deserialized object for the persistedstate. As the plugin knows the structure of its state it can optimize the serialization and deserialization of its data.

This change solves the slow export issue and makes it blazing fast..... 🏎

Bug:

{F206550514}

Reviewed By: danielbuechele

Differential Revision: D17166054

fbshipit-source-id: 058b903c03c12c9194702162c46763ef5b5e7283
2019-09-09 06:13:39 -07:00
John Knox
b4c1d1942a Make File > Open more self-explanatory
Summary:
Yesterday I saw someone try to open the xcode executable with the File > Open function.

This made me realise it's not clear what this is for, and you might think it can open all kinds of things.

Reviewed By: danielbuechele

Differential Revision: D17225496

fbshipit-source-id: 893360a1f450a8db25be34fce6c288e8db8f9626
2019-09-06 04:14:58 -07:00
Pascal Hartig
0f270c9f48 Migrate packageMetadata
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D16782045

fbshipit-source-id: cfbabc036eb707f76a375f451ccc831b25c6d462
2019-08-14 04:43:51 -07:00
Pascal Hartig
6c7aeef7ed Migrate exportMetrics
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D16712087

fbshipit-source-id: 63dc45a26eb8112aef2b1bfa0d67bf57aa9ec72a
2019-08-12 03:53:16 -07:00
Pascal Hartig
99ca6aa7e8 Migrate exportData
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D16711940

fbshipit-source-id: 2e0e5cd0440fe1cdb7bd29af94e22c7f6b9137f8
2019-08-12 03:53:15 -07:00