pb.proto 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. // timestamp of the first analysed commit
  10. int64 begin_unix_time = 4;
  11. // timestamp of the last analysed commit
  12. int64 end_unix_time = 5;
  13. // number of processed commits
  14. int32 commits = 6;
  15. }
  16. message BurndownSparseMatrixRow {
  17. // the first `len(column)` elements are stored,
  18. // the rest `number_of_columns - len(column)` values are zeros
  19. repeated uint32 columns = 1;
  20. }
  21. message BurndownSparseMatrix {
  22. string name = 1;
  23. int32 number_of_rows = 2;
  24. int32 number_of_columns = 3;
  25. // `len(row)` matches `number_of_rows`
  26. repeated BurndownSparseMatrixRow rows = 4;
  27. }
  28. message BurndownAnalysisResults {
  29. // how many days are in each band [burndown_project, burndown_file, burndown_developer]
  30. int32 granularity = 1;
  31. // how frequently we measure the state of each band [burndown_project, burndown_file, burndown_developer]
  32. int32 sampling = 2;
  33. // always exists
  34. BurndownSparseMatrix project = 3;
  35. // this is included if `-burndown-files` was specified
  36. repeated BurndownSparseMatrix files = 4;
  37. // these two are included if `-burndown-people` was specified
  38. repeated BurndownSparseMatrix people = 5;
  39. // rows and cols order correspond to `burndown_developer`
  40. CompressedSparseRowMatrix people_interaction = 6;
  41. }
  42. message CompressedSparseRowMatrix {
  43. int32 number_of_rows = 1;
  44. int32 number_of_columns = 2;
  45. // https://en.wikipedia.org/wiki/Sparse_matrix#Compressed_sparse_row_.28CSR.2C_CRS_or_Yale_format.29
  46. repeated int64 data = 3;
  47. repeated int32 indices = 4;
  48. repeated int64 indptr = 5;
  49. }
  50. message Couples {
  51. // name of each `matrix`'s row and column
  52. repeated string index = 1;
  53. // is always square
  54. CompressedSparseRowMatrix matrix = 2;
  55. }
  56. message TouchedFiles {
  57. repeated int32 files = 1; // values correspond to `file_couples::index`
  58. }
  59. message DeveloperTouchedFiles {
  60. // order corresponds to `developer_couples::index`
  61. repeated TouchedFiles developers = 1;
  62. }
  63. message CouplesAnalysisResults {
  64. Couples file_couples = 6;
  65. Couples developer_couples = 7;
  66. DeveloperTouchedFiles touched_files = 8;
  67. }
  68. message UASTChange {
  69. string file_name = 1;
  70. string src_before = 2;
  71. string src_after = 3;
  72. string uast_before = 4;
  73. string uast_after = 5;
  74. }
  75. message UASTChangesSaverResults {
  76. repeated UASTChange changes = 1;
  77. }
  78. message AnalysisResults {
  79. Metadata header = 1;
  80. // the mapped values are dynamic messages which require the second parsing pass.
  81. map<string, bytes> contents = 2;
  82. }