pb.proto 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. syntax = "proto3";
  2. message Metadata {
  3. // this format is versioned
  4. int32 version = 1;
  5. // git hash of the revision from which Hercules is built
  6. string hash = 2;
  7. // repository's name
  8. string repository = 3;
  9. // UNIX timestamp of the first analysed commit
  10. int64 begin_unix_time = 4;
  11. // UNIX timestamp of the last analysed commit
  12. int64 end_unix_time = 5;
  13. // number of processed commits
  14. int32 commits = 6;
  15. // duration of the analysis in milliseconds
  16. int64 run_time = 7;
  17. }
  18. message BurndownSparseMatrixRow {
  19. // the first `len(column)` elements are stored,
  20. // the rest `number_of_columns - len(column)` values are zeros
  21. repeated uint32 columns = 1;
  22. }
  23. message BurndownSparseMatrix {
  24. string name = 1;
  25. int32 number_of_rows = 2;
  26. int32 number_of_columns = 3;
  27. // `len(row)` matches `number_of_rows`
  28. repeated BurndownSparseMatrixRow rows = 4;
  29. }
  30. message BurndownAnalysisResults {
  31. // how many days are in each band [burndown_project, burndown_file, burndown_developer]
  32. int32 granularity = 1;
  33. // how frequently we measure the state of each band [burndown_project, burndown_file, burndown_developer]
  34. int32 sampling = 2;
  35. // always exists
  36. BurndownSparseMatrix project = 3;
  37. // this is included if `-burndown-files` was specified
  38. repeated BurndownSparseMatrix files = 4;
  39. // these two are included if `-burndown-people` was specified
  40. repeated BurndownSparseMatrix people = 5;
  41. // rows and cols order correspond to `burndown_developer`
  42. CompressedSparseRowMatrix people_interaction = 6;
  43. }
  44. message CompressedSparseRowMatrix {
  45. int32 number_of_rows = 1;
  46. int32 number_of_columns = 2;
  47. // https://en.wikipedia.org/wiki/Sparse_matrix#Compressed_sparse_row_.28CSR.2C_CRS_or_Yale_format.29
  48. repeated int64 data = 3;
  49. repeated int32 indices = 4;
  50. repeated int64 indptr = 5;
  51. }
  52. message Couples {
  53. // name of each `matrix`'s row and column
  54. repeated string index = 1;
  55. // is always square
  56. CompressedSparseRowMatrix matrix = 2;
  57. }
  58. message TouchedFiles {
  59. repeated int32 files = 1; // values correspond to `file_couples::index`
  60. }
  61. message CouplesAnalysisResults {
  62. Couples file_couples = 6;
  63. Couples people_couples = 7;
  64. // order corresponds to `people_couples::index`
  65. repeated TouchedFiles people_files = 8;
  66. }
  67. message UASTChange {
  68. string file_name = 1;
  69. string src_before = 2;
  70. string src_after = 3;
  71. string uast_before = 4;
  72. string uast_after = 5;
  73. }
  74. message UASTChangesSaverResults {
  75. repeated UASTChange changes = 1;
  76. }
  77. message ShotnessRecord {
  78. string internal_role = 1;
  79. repeated int32 roles = 2;
  80. string name = 3;
  81. string file = 4;
  82. map<int32, int32> counters = 5;
  83. }
  84. message ShotnessAnalysisResults {
  85. repeated ShotnessRecord records = 1;
  86. }
  87. message FileHistory {
  88. repeated string commits = 1;
  89. }
  90. message FileHistoryResultMessage {
  91. map<string, FileHistory> files = 1;
  92. }
  93. message Sentiment {
  94. float value = 1;
  95. repeated string comments = 2;
  96. repeated string commits = 3;
  97. }
  98. message CommentSentimentResults {
  99. map<int32, Sentiment> sentiment_by_day = 1;
  100. }
  101. message AnalysisResults {
  102. Metadata header = 1;
  103. // the mapped values are dynamic messages which require the second parsing pass.
  104. map<string, bytes> contents = 2;
  105. }