pb.proto 2.6 KB

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