unity3d-jp / ProfilerReader

The library that read Unity profiler binary log directly
Other
155 stars 27 forks source link

(Question) Analyze fails with binary data (.data) saved in ProfilerWindow. #2

Open ryu8179 opened 3 years ago

ryu8179 commented 3 years ago

Question

Does this tool not support binary data (.data) saved in ProfilerWindow? But analysis succeeded with binary data (.raw) saved from Script with Profiler.enableBinaryLog = true; and so on.

Environment

Procedure

  1. Open Window > Profiler
  2. Run SampleScene
  3. Save the binary data in ProfilerWindow
  4. Open ProfilerReader > AnalyzeToCsv
  5. Open the file just saved and execute Analyze.
  6. Exception: This log file isn't supported. error is displayed in Console
roger-creus commented 3 years ago

I think yes, exactly. It only supports logs from Profiler.logFile. Still, the csv files that I am getting have more columns than column names, and it gives me proublems when trying to read them in Python or R. Same happened to you?

ryu8179 commented 3 years ago

@yuyecreus , thanks for the reply!

I haven't tried it in Python or R, but I think I'm having the same problem.

Thanks.

aadi3124 commented 3 years ago

Hi, I am able to analyze only 300 frames, I think Unity exports only 300 frames .data file or may be this tool has the limitation, I don't know . I need more frames. Is there any way to do that. Please let me know if anyone has the solution. Thanks in advance.

ryu8179 commented 3 years ago

Hi @aadi3124

In Unity 2019.4 and later, You can change from 300 to 2,000 frames. (max) https://docs.unity3d.com/2019.4/Documentation/Manual/ProfilerWindow.html

However, this repository tool does not support data saved from the Profiler Window (.data), and only data saved from Scripts (.raw) seems to be available.

aadi3124 commented 3 years ago

Hi @ryu8179 Thanks for the reply! Actually In my case I am able to analyze data saved from the Profiler Windows (i.e .data file) and raw file as well. but I am getting an issue like after converting those data into csv, in case of .data file I am getting one more .csv file than .raw file and that file is mainThread file, please check the attached screenshot. Please let me know in case of raw which file to check for main info or main thread.

Screenshot 2021-08-18 191259

aadi3124 commented 3 years ago

The selected one (the above one is from .data file)

aadi3124 commented 3 years ago

Hi @ryu8179 Is there a way to convert .raw into .data file? because in .raw data lots of information are missing or gets lost. After checking .raw converted csv's, I not getting the info I wanted as in case of .data file (because of one major file is missing in case of .raw). Please let me know. Thanks!

ryu8179 commented 3 years ago

@aadi3124 Sorry, I don't know how to convert.

aadi3124 commented 3 years ago

Hi @ryu8179 I am getting this error, What would be the possible reasons for this?

System.Exception: This log file isn't supported. 0x20200924 at UTJ.ProfilerReader.BinaryData.ProfilerFrameBlockData.Read (System.IO.Stream stream, System.Int32 frameIndex, System.String unityVersion) [0x001be] in :0 at UTJ.ProfilerReader.BinaryData.ProfilerBinaryLogReader.ReadFrameData () [0x00064] in :0 at UTJ.ProfilerReader.UI.AnalyzeToCsvWindow.ExecuteFrame () [0x00018] in C:\Winzo\UnityProjectsTest\UnitTestingExample\Assets\Plugins\ProfilerReader-main\Editor\GUI\AnalyzeToCsvWindow.cs:80 UnityEngine.Debug:LogError(Object) UTJ.ProfilerReader.UI.AnalyzeToCsvWindow:ExecuteFrame() (at Assets/Plugins/ProfilerReader-main/Editor/GUI/AnalyzeToCsvWindow.cs:115) UTJ.ProfilerReader.UI.AnalyzeToCsvWindow:UpdateThread() (at Assets/Plugins/ProfilerReader-main/Editor/GUI/AnalyzeToCsvWindow.cs:66) System.Threading.ThreadHelper:ThreadStart()

Thanks!