pb.proto 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. // how many days are in each band [burndown_project, burndown_file, burndown_developer]
  14. int32 granularity = 6;
  15. // how frequently we measure the state of each band [burndown_project, burndown_file, burndown_developer]
  16. int32 sampling = 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 CompressedSparseRowMatrix {
  31. int32 number_of_rows = 1;
  32. int32 number_of_columns = 2;
  33. // https://en.wikipedia.org/wiki/Sparse_matrix#Compressed_sparse_row_.28CSR.2C_CRS_or_Yale_format.29
  34. repeated int64 data = 3;
  35. repeated int32 indices = 4;
  36. repeated int64 indptr = 5;
  37. }
  38. message Couples {
  39. // name of each `matrix`'s row and column
  40. repeated string index = 1;
  41. // is always square
  42. CompressedSparseRowMatrix matrix = 2;
  43. }
  44. message TouchedFiles {
  45. repeated int32 files = 1; // values correspond to `file_couples::index`
  46. }
  47. message DeveloperTouchedFiles {
  48. // order corresponds to `developer_couples::index`
  49. repeated TouchedFiles developers = 1;
  50. }
  51. message AnalysisResults {
  52. // these two are always included
  53. Metadata header = 1;
  54. BurndownSparseMatrix burndown_project = 2;
  55. // this is included if `-files` was specified
  56. repeated BurndownSparseMatrix burndown_files = 3;
  57. // these two are included if `-people` was specified
  58. repeated BurndownSparseMatrix burndown_developers = 4;
  59. // rows and cols order correspond to `burndown_developer`
  60. CompressedSparseRowMatrix developers_interaction = 5;
  61. // these three are included if `-couples` was specified
  62. Couples file_couples = 6;
  63. Couples developer_couples = 7;
  64. DeveloperTouchedFiles touched_files = 8;
  65. }