CoverageAnalyticsEvent.cs 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. using System;
  2. using UnityEngine;
  3. namespace UnityEditor.TestTools.CodeCoverage.Analytics
  4. {
  5. [Serializable]
  6. internal class CoverageAnalyticsEvent
  7. {
  8. // The action performed on the event (batchmode compatible)
  9. public ActionID actionID;
  10. // Array of resultsIds (batchmode compatible)
  11. public int[] resultIds;
  12. // The coverage mode that was performed on successful action (batchmode compatible)
  13. public CoverageModeID coverageModeId;
  14. // Duration (in ms) for which the Coverage session lasted (batchmode compatible)
  15. public long duration;
  16. // Was the coverage session result a success (batchmode compatible)
  17. public bool success;
  18. // Did the user run the editor from the command line
  19. public bool runFromCommandLine;
  20. // Did the user run the editor in batch mode
  21. public bool batchmode;
  22. // Did the user have Generate HTML Report selected (batchmode compatible)
  23. public bool generateHTMLReport;
  24. // Did the user have Generate History selected (batchmode compatible)
  25. public bool generateHistory;
  26. // Did the user have Generate Badges selected (batchmode compatible)
  27. public bool createBadges;
  28. // Did the user have Generate Additional Metrics selected (batchmode compatible)
  29. public bool generateMetrics;
  30. // Did the user have Autogenerate Report selected (batchmode compatible)
  31. public bool autogenerate;
  32. // Did the user select the Clear Data button
  33. public bool clearData;
  34. // Did the user select the Clear History button
  35. public bool clearHistory;
  36. // Did the user select the Generate From Last button
  37. public bool generateFromLast;
  38. // Did the user switch to Debug mode (Code Optimization) in the Coverage window
  39. public bool switchToDebugMode;
  40. // Is the editor in Code Optimization: Debug mode (batchmode compatible)
  41. public bool inDebugMode;
  42. // Did the user disable Burst Compilation in the Coverage window
  43. public bool switchBurstOff;
  44. // Did the user select a new Results location or uses the default one (batchmode compatible)
  45. public bool useDefaultResultsLoc;
  46. // Did the user select a new History location or uses the default one (batchmode compatible)
  47. public bool useDefaultHistoryLoc;
  48. // Did the user specify different assemblies from the default ones (batchmode compatible)
  49. public bool useDefaultAssemblyFilters;
  50. // Did the user specify different paths filtering from the default one (batchmode compatible)
  51. public bool useDefaultPathFilters;
  52. // Did the user enter the Selected Assemblies dialog/dropdown
  53. public bool enterAssembliesDialog;
  54. // Did the user update any assemblies via the Selected Assemblies dialog/dropdown
  55. public bool updateAssembliesDialog;
  56. // Did the user update Included Paths
  57. public bool updateIncludedPaths;
  58. // Did the user select Add Folder for Included Paths
  59. public bool selectAddFolder_IncludedPaths;
  60. // Did the user select Add File for Included Paths
  61. public bool selectAddFile_IncludedPaths;
  62. // How many paths are included (batchmode compatible)
  63. public int numOfIncludedPaths;
  64. // Did the user update Excluded Paths
  65. public bool updateExcludedPaths;
  66. // Did the user select Add Folder for Excluded Paths
  67. public bool selectAddFolder_ExcludedPaths;
  68. // Did the user select Add File for Excluded Paths
  69. public bool selectAddFile_ExcludedPaths;
  70. // How many paths are excluded (batchmode compatible)
  71. public int numOfExcludedPaths;
  72. // Did the user use the Coverage API to StartRecording (batchmode compatible)
  73. public bool useAPI_StartRec;
  74. // Did the user use the Coverage API to StopRecording (batchmode compatible)
  75. public bool useAPI_StopRec;
  76. // Did the user use the Coverage API to PauseRecording (batchmode compatible)
  77. public bool useAPI_PauseRec;
  78. // Did the user use the Coverage API to UnpauseRecording (batchmode compatible)
  79. public bool useAPI_UnpauseRec;
  80. // Array of individual included assembly names (batchmode compatible)
  81. public string[] includedAssemblies;
  82. // Array of individual excluded assembly names (batchmode only)
  83. public string[] excludedAssemblies;
  84. }
  85. /* Future-proof
  86. **
  87. [Serializable]
  88. internal struct Result
  89. {
  90. // The result id
  91. public int resultId;
  92. // Extra information (optional)
  93. public string extra;
  94. public Result(int resultId, string extra = "")
  95. {
  96. this.resultId = resultId;
  97. this.extra = extra;
  98. }
  99. }
  100. */
  101. }