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

Report Format #1

Open
KosRud opened this issue Nov 23, 2022 · 1 comment
Open

Report Format #1

KosRud opened this issue Nov 23, 2022 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@KosRud
Copy link
Owner

KosRud commented Nov 23, 2022

Current JSON format is inefficient for both on-disk and in-memory storage. Change how frame/variance data is stored.

Current format:

frameVarianceRecords: {
    frameIndex: number,
    variance: number,
}[]

New format:

frameVarianceRecords: {
    frameIndices: number[],
    varianceValues: number[],
}

Also create separate .json reports for each dispatch (currently doing one report per benchmark).
Add full JSON format to README.
Verify that validators are up to date with Unity code.

Also consider BSON, MessagePack.
Consider storing one JSON object per line and streaming the report file lazily.

Get rid of Unity's JSON and serialize reports as "normal" JSON.

See if v8 is using hidden classes. See %GetOptimizationStatus(), %HasFastProperties(), %HaveSameMap(), node flag --allow-natives-syntax.

@KosRud KosRud added the enhancement New feature or request label Nov 23, 2022
@KosRud KosRud self-assigned this Nov 23, 2022
@KosRud KosRud added the documentation Improvements or additions to documentation label Nov 23, 2022
@KosRud
Copy link
Owner Author

KosRud commented Mar 22, 2023

Unity includes Json.NET by default, just use Newtonsoft.Json.JsonConvert. Unlike UnityEngine.JsonUtility, Json.Net properly serializes nested objects and does not require [Serializable] attribute.

It also supports BSON: SerializeToBson.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant