From de3c384242ec295197a6b0f9d606e2309737d513 Mon Sep 17 00:00:00 2001 From: Vadim Markovtsev Date: Tue, 26 Feb 2019 15:22:17 +0100 Subject: [PATCH] Add blame info per file with --burndown-file Signed-off-by: Vadim Markovtsev --- internal/burndown/file.go | 36 +++-- internal/pb/pb.pb.go | 236 +++++++++++++++++++-------------- internal/pb/pb.proto | 11 +- internal/pb/pb_pb2.py | 197 ++++++++++++++++++++------- internal/test_data/burndown.pb | Bin 7291 -> 9018 bytes leaves/burndown.go | 72 +++++++++- leaves/burndown_test.go | 34 +++-- 7 files changed, 403 insertions(+), 183 deletions(-) diff --git a/internal/burndown/file.go b/internal/burndown/file.go index e411adcf..d627ac96 100644 --- a/internal/burndown/file.go +++ b/internal/burndown/file.go @@ -123,12 +123,12 @@ func (file *File) Delete() { // Len returns the File's size - that is, the maximum key in the tree of line // intervals. -func (file *File) Len() int { +func (file File) Len() int { return int(file.tree.Max().Item().Key) } // Nodes returns the number of RBTree nodes in the file. -func (file *File) Nodes() int { +func (file File) Nodes() int { return file.tree.Len() } @@ -327,18 +327,11 @@ func (file *File) Merge(day int, others ...*File) { // Dump formats the underlying line interval tree into a string. // Useful for error messages, panic()-s and debugging. -func (file *File) Dump() string { +func (file File) Dump() string { buffer := "" - for iter := file.tree.Min(); !iter.Limit(); iter = iter.Next() { - node := iter.Item() - var val int - if node.Value == math.MaxUint32 { - val = -1 - } else { - val = int(node.Value) - } - buffer += fmt.Sprintf("%d %d\n", node.Key, val) - } + file.ForEach(func(line, value int) { + buffer += fmt.Sprintf("%d %d\n", line, value) + }) return buffer } @@ -351,7 +344,7 @@ func (file *File) Dump() string { // which marks the ending of the last line interval. // // 3. Node keys must monotonically increase and never duplicate. -func (file *File) Validate() { +func (file File) Validate() { if file.tree.Min().Item().Key != 0 { log.Panic("the tree must start with key 0") } @@ -371,6 +364,21 @@ func (file *File) Validate() { } } +// ForEach visits each node in the underlying tree, in ascending key order. +func (file File) ForEach(callback func(line, value int)) { + for iter := file.tree.Min(); !iter.Limit(); iter = iter.Next() { + item := iter.Item() + key := int(item.Key) + var value int + if item.Value == math.MaxUint32 { + value = -1 + } else { + value = int(item.Value) + } + callback(key, value) + } +} + // flatten represents the file as a slice of lines, each line's value being the corresponding day. func (file *File) flatten() []int { lines := make([]int, 0, file.Len()) diff --git a/internal/pb/pb.pb.go b/internal/pb/pb.pb.go index c47fe15a..f1d6ef5e 100644 --- a/internal/pb/pb.pb.go +++ b/internal/pb/pb.pb.go @@ -11,6 +11,7 @@ It has these top-level messages: Metadata BurndownSparseMatrixRow BurndownSparseMatrix + FilesOwnership BurndownAnalysisResults CompressedSparseRowMatrix Couples @@ -186,6 +187,23 @@ func (m *BurndownSparseMatrix) GetRows() []*BurndownSparseMatrixRow { return nil } +type FilesOwnership struct { + // The sum always equals to the total number of lines in the file. + Value map[int32]int32 `protobuf:"bytes,1,rep,name=value" json:"value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` +} + +func (m *FilesOwnership) Reset() { *m = FilesOwnership{} } +func (m *FilesOwnership) String() string { return proto.CompactTextString(m) } +func (*FilesOwnership) ProtoMessage() {} +func (*FilesOwnership) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{3} } + +func (m *FilesOwnership) GetValue() map[int32]int32 { + if m != nil { + return m.Value + } + return nil +} + type BurndownAnalysisResults struct { // how many days are in each band [burndown_project, burndown_file, burndown_developer] Granularity int32 `protobuf:"varint,1,opt,name=granularity,proto3" json:"granularity,omitempty"` @@ -193,18 +211,20 @@ type BurndownAnalysisResults struct { Sampling int32 `protobuf:"varint,2,opt,name=sampling,proto3" json:"sampling,omitempty"` // always exists Project *BurndownSparseMatrix `protobuf:"bytes,3,opt,name=project" json:"project,omitempty"` - // this is included if `-burndown-files` was specified + // this is included if `--burndown-files` was specified Files []*BurndownSparseMatrix `protobuf:"bytes,4,rep,name=files" json:"files,omitempty"` - // these two are included if `-burndown-people` was specified + // these two are included if `--burndown-people` was specified People []*BurndownSparseMatrix `protobuf:"bytes,5,rep,name=people" json:"people,omitempty"` // rows and cols order correspond to `burndown_developer` PeopleInteraction *CompressedSparseRowMatrix `protobuf:"bytes,6,opt,name=people_interaction,json=peopleInteraction" json:"people_interaction,omitempty"` + // How many lines belong to relevant developers for each file. The order is the same as in `files`. + FilesOwnership []*FilesOwnership `protobuf:"bytes,7,rep,name=files_ownership,json=filesOwnership" json:"files_ownership,omitempty"` } func (m *BurndownAnalysisResults) Reset() { *m = BurndownAnalysisResults{} } func (m *BurndownAnalysisResults) String() string { return proto.CompactTextString(m) } func (*BurndownAnalysisResults) ProtoMessage() {} -func (*BurndownAnalysisResults) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{3} } +func (*BurndownAnalysisResults) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{4} } func (m *BurndownAnalysisResults) GetGranularity() int32 { if m != nil { @@ -248,6 +268,13 @@ func (m *BurndownAnalysisResults) GetPeopleInteraction() *CompressedSparseRowMat return nil } +func (m *BurndownAnalysisResults) GetFilesOwnership() []*FilesOwnership { + if m != nil { + return m.FilesOwnership + } + return nil +} + type CompressedSparseRowMatrix struct { NumberOfRows int32 `protobuf:"varint,1,opt,name=number_of_rows,json=numberOfRows,proto3" json:"number_of_rows,omitempty"` NumberOfColumns int32 `protobuf:"varint,2,opt,name=number_of_columns,json=numberOfColumns,proto3" json:"number_of_columns,omitempty"` @@ -260,7 +287,7 @@ type CompressedSparseRowMatrix struct { func (m *CompressedSparseRowMatrix) Reset() { *m = CompressedSparseRowMatrix{} } func (m *CompressedSparseRowMatrix) String() string { return proto.CompactTextString(m) } func (*CompressedSparseRowMatrix) ProtoMessage() {} -func (*CompressedSparseRowMatrix) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{4} } +func (*CompressedSparseRowMatrix) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{5} } func (m *CompressedSparseRowMatrix) GetNumberOfRows() int32 { if m != nil { @@ -307,7 +334,7 @@ type Couples struct { func (m *Couples) Reset() { *m = Couples{} } func (m *Couples) String() string { return proto.CompactTextString(m) } func (*Couples) ProtoMessage() {} -func (*Couples) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{5} } +func (*Couples) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{6} } func (m *Couples) GetIndex() []string { if m != nil { @@ -330,7 +357,7 @@ type TouchedFiles struct { func (m *TouchedFiles) Reset() { *m = TouchedFiles{} } func (m *TouchedFiles) String() string { return proto.CompactTextString(m) } func (*TouchedFiles) ProtoMessage() {} -func (*TouchedFiles) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{6} } +func (*TouchedFiles) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{7} } func (m *TouchedFiles) GetFiles() []int32 { if m != nil { @@ -351,7 +378,7 @@ type CouplesAnalysisResults struct { func (m *CouplesAnalysisResults) Reset() { *m = CouplesAnalysisResults{} } func (m *CouplesAnalysisResults) String() string { return proto.CompactTextString(m) } func (*CouplesAnalysisResults) ProtoMessage() {} -func (*CouplesAnalysisResults) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{7} } +func (*CouplesAnalysisResults) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{8} } func (m *CouplesAnalysisResults) GetFileCouples() *Couples { if m != nil { @@ -392,7 +419,7 @@ type UASTChange struct { func (m *UASTChange) Reset() { *m = UASTChange{} } func (m *UASTChange) String() string { return proto.CompactTextString(m) } func (*UASTChange) ProtoMessage() {} -func (*UASTChange) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{8} } +func (*UASTChange) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{9} } func (m *UASTChange) GetFileName() string { if m != nil { @@ -436,7 +463,7 @@ type UASTChangesSaverResults struct { func (m *UASTChangesSaverResults) Reset() { *m = UASTChangesSaverResults{} } func (m *UASTChangesSaverResults) String() string { return proto.CompactTextString(m) } func (*UASTChangesSaverResults) ProtoMessage() {} -func (*UASTChangesSaverResults) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{9} } +func (*UASTChangesSaverResults) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{10} } func (m *UASTChangesSaverResults) GetChanges() []*UASTChange { if m != nil { @@ -455,7 +482,7 @@ type ShotnessRecord struct { func (m *ShotnessRecord) Reset() { *m = ShotnessRecord{} } func (m *ShotnessRecord) String() string { return proto.CompactTextString(m) } func (*ShotnessRecord) ProtoMessage() {} -func (*ShotnessRecord) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{10} } +func (*ShotnessRecord) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{11} } func (m *ShotnessRecord) GetType() string { if m != nil { @@ -492,7 +519,7 @@ type ShotnessAnalysisResults struct { func (m *ShotnessAnalysisResults) Reset() { *m = ShotnessAnalysisResults{} } func (m *ShotnessAnalysisResults) String() string { return proto.CompactTextString(m) } func (*ShotnessAnalysisResults) ProtoMessage() {} -func (*ShotnessAnalysisResults) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{11} } +func (*ShotnessAnalysisResults) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{12} } func (m *ShotnessAnalysisResults) GetRecords() []*ShotnessRecord { if m != nil { @@ -508,7 +535,7 @@ type FileHistory struct { func (m *FileHistory) Reset() { *m = FileHistory{} } func (m *FileHistory) String() string { return proto.CompactTextString(m) } func (*FileHistory) ProtoMessage() {} -func (*FileHistory) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{12} } +func (*FileHistory) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{13} } func (m *FileHistory) GetCommits() []string { if m != nil { @@ -524,7 +551,7 @@ type FileHistoryResultMessage struct { func (m *FileHistoryResultMessage) Reset() { *m = FileHistoryResultMessage{} } func (m *FileHistoryResultMessage) String() string { return proto.CompactTextString(m) } func (*FileHistoryResultMessage) ProtoMessage() {} -func (*FileHistoryResultMessage) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{13} } +func (*FileHistoryResultMessage) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{14} } func (m *FileHistoryResultMessage) GetFiles() map[string]*FileHistory { if m != nil { @@ -542,7 +569,7 @@ type LineStats struct { func (m *LineStats) Reset() { *m = LineStats{} } func (m *LineStats) String() string { return proto.CompactTextString(m) } func (*LineStats) ProtoMessage() {} -func (*LineStats) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{14} } +func (*LineStats) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{15} } func (m *LineStats) GetAdded() int32 { if m != nil { @@ -574,7 +601,7 @@ type DevDay struct { func (m *DevDay) Reset() { *m = DevDay{} } func (m *DevDay) String() string { return proto.CompactTextString(m) } func (*DevDay) ProtoMessage() {} -func (*DevDay) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{15} } +func (*DevDay) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{16} } func (m *DevDay) GetCommits() int32 { if m != nil { @@ -604,7 +631,7 @@ type DayDevs struct { func (m *DayDevs) Reset() { *m = DayDevs{} } func (m *DayDevs) String() string { return proto.CompactTextString(m) } func (*DayDevs) ProtoMessage() {} -func (*DayDevs) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{16} } +func (*DayDevs) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{17} } func (m *DayDevs) GetDevs() map[int32]*DevDay { if m != nil { @@ -621,7 +648,7 @@ type DevsAnalysisResults struct { func (m *DevsAnalysisResults) Reset() { *m = DevsAnalysisResults{} } func (m *DevsAnalysisResults) String() string { return proto.CompactTextString(m) } func (*DevsAnalysisResults) ProtoMessage() {} -func (*DevsAnalysisResults) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{17} } +func (*DevsAnalysisResults) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{18} } func (m *DevsAnalysisResults) GetDays() map[int32]*DayDevs { if m != nil { @@ -646,7 +673,7 @@ type Sentiment struct { func (m *Sentiment) Reset() { *m = Sentiment{} } func (m *Sentiment) String() string { return proto.CompactTextString(m) } func (*Sentiment) ProtoMessage() {} -func (*Sentiment) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{18} } +func (*Sentiment) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{19} } func (m *Sentiment) GetValue() float32 { if m != nil { @@ -676,7 +703,7 @@ type CommentSentimentResults struct { func (m *CommentSentimentResults) Reset() { *m = CommentSentimentResults{} } func (m *CommentSentimentResults) String() string { return proto.CompactTextString(m) } func (*CommentSentimentResults) ProtoMessage() {} -func (*CommentSentimentResults) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{19} } +func (*CommentSentimentResults) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{20} } func (m *CommentSentimentResults) GetSentimentByDay() map[int32]*Sentiment { if m != nil { @@ -694,7 +721,7 @@ type AnalysisResults struct { func (m *AnalysisResults) Reset() { *m = AnalysisResults{} } func (m *AnalysisResults) String() string { return proto.CompactTextString(m) } func (*AnalysisResults) ProtoMessage() {} -func (*AnalysisResults) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{20} } +func (*AnalysisResults) Descriptor() ([]byte, []int) { return fileDescriptorPb, []int{21} } func (m *AnalysisResults) GetHeader() *Metadata { if m != nil { @@ -714,6 +741,7 @@ func init() { proto.RegisterType((*Metadata)(nil), "Metadata") proto.RegisterType((*BurndownSparseMatrixRow)(nil), "BurndownSparseMatrixRow") proto.RegisterType((*BurndownSparseMatrix)(nil), "BurndownSparseMatrix") + proto.RegisterType((*FilesOwnership)(nil), "FilesOwnership") proto.RegisterType((*BurndownAnalysisResults)(nil), "BurndownAnalysisResults") proto.RegisterType((*CompressedSparseRowMatrix)(nil), "CompressedSparseRowMatrix") proto.RegisterType((*Couples)(nil), "Couples") @@ -737,86 +765,90 @@ func init() { func init() { proto.RegisterFile("pb.proto", fileDescriptorPb) } var fileDescriptorPb = []byte{ - // 1289 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x57, 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, 0x0c, 0x00, 0x00, + // 1350 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x57, 0xcd, 0x6e, 0xdb, 0xc6, + 0x16, 0x06, 0xf5, 0xaf, 0x23, 0x5b, 0x4e, 0x26, 0xb9, 0x31, 0xa3, 0x0b, 0xe7, 0xea, 0x12, 0xb9, + 0xb9, 0x6e, 0x93, 0x32, 0x81, 0xd2, 0x45, 0x9a, 0x6e, 0xe2, 0xd8, 0x0d, 0x62, 0x20, 0x6e, 0x8a, + 0x51, 0x92, 0x2e, 0x89, 0xb1, 0x38, 0xb6, 0xd8, 0x8a, 0x43, 0x62, 0x86, 0x94, 0x2d, 0xa0, 0xcf, + 0xd2, 0x5d, 0x17, 0x2d, 0xd0, 0x55, 0x5f, 0xa0, 0x8b, 0x6e, 0xfa, 0x22, 0x05, 0xfa, 0x16, 0xc5, + 0xfc, 0x51, 0xa4, 0x4a, 0xa7, 0xed, 0x4e, 0xe7, 0x9c, 0xef, 0xcc, 0x7c, 0xf3, 0x9d, 0x33, 0x67, + 0x28, 0xe8, 0xa5, 0xa7, 0x7e, 0xca, 0x93, 0x2c, 0xf1, 0x7e, 0x6b, 0x40, 0xef, 0x84, 0x66, 0x24, + 0x24, 0x19, 0x41, 0x2e, 0x74, 0x97, 0x94, 0x8b, 0x28, 0x61, 0xae, 0x33, 0x76, 0xf6, 0xdb, 0xd8, + 0x9a, 0x08, 0x41, 0x6b, 0x4e, 0xc4, 0xdc, 0x6d, 0x8c, 0x9d, 0xfd, 0x3e, 0x56, 0xbf, 0xd1, 0x1d, + 0x00, 0x4e, 0xd3, 0x44, 0x44, 0x59, 0xc2, 0x57, 0x6e, 0x53, 0x45, 0x4a, 0x1e, 0x74, 0x0f, 0x76, + 0x4e, 0xe9, 0x79, 0xc4, 0x82, 0x9c, 0x45, 0x97, 0x41, 0x16, 0xc5, 0xd4, 0x6d, 0x8d, 0x9d,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 0x0d, 0x1c, + 0xbd, 0x84, 0x61, 0x35, 0x58, 0xa3, 0xcf, 0xb8, 0xaa, 0x4f, 0x65, 0xef, 0xb5, 0x3a, 0x02, 0xba, + 0x47, 0x64, 0x75, 0x44, 0x97, 0x02, 0xdd, 0x83, 0x56, 0x48, 0x97, 0xb6, 0x56, 0xc8, 0x37, 0x7e, + 0xc9, 0xc6, 0x30, 0x50, 0xf1, 0xd1, 0x33, 0xe8, 0x17, 0xae, 0x9a, 0xce, 0xdc, 0xab, 0xee, 0xdb, + 0x35, 0xa7, 0x29, 0x6f, 0xfa, 0xbd, 0x03, 0x37, 0xe4, 0x12, 0x9b, 0xfd, 0x39, 0x91, 0x83, 0x7f, + 0x65, 0x19, 0xdc, 0xf1, 0x6b, 0x30, 0x92, 0x55, 0xc1, 0x86, 0xac, 0x84, 0x1c, 0x2a, 0x21, 0x5d, + 0x06, 0x7a, 0xbe, 0x37, 0x54, 0x6f, 0xf6, 0x42, 0xba, 0x3c, 0x96, 0xf6, 0xe8, 0x00, 0xfa, 0x05, + 0xbe, 0x86, 0xea, 0x9d, 0x2a, 0xd5, 0x9e, 0x3d, 0x72, 0x99, 0xeb, 0x97, 0xd0, 0x9f, 0x52, 0x26, + 0x3f, 0x2a, 0x59, 0xb6, 0xbe, 0x75, 0x72, 0x91, 0x86, 0x81, 0xc9, 0xaf, 0x09, 0x59, 0x70, 0xca, + 0x54, 0xa1, 0x15, 0x03, 0x6b, 0x97, 0x7b, 0xa3, 0x59, 0xbd, 0x38, 0x3f, 0x3b, 0xb0, 0x7b, 0xa8, + 0x61, 0xc5, 0x06, 0x56, 0x88, 0x77, 0x70, 0x4d, 0x58, 0x5f, 0x70, 0xba, 0x0a, 0x42, 0xb2, 0x32, + 0xa2, 0x3c, 0xf0, 0xaf, 0xc8, 0xf1, 0x0b, 0xc7, 0xf3, 0xd5, 0x11, 0x59, 0x99, 0x0f, 0x5b, 0x51, + 0x71, 0x8e, 0x4e, 0xe0, 0x46, 0x0d, 0xac, 0x46, 0x99, 0x3f, 0x35, 0xcf, 0x7a, 0xbb, 0x92, 0x36, + 0x3f, 0x3a, 0xb0, 0xb3, 0x59, 0xc3, 0xff, 0x42, 0x67, 0x4e, 0x49, 0x48, 0xb9, 0x5a, 0x6e, 0x30, + 0xe9, 0x17, 0x9f, 0xde, 0xd8, 0x04, 0xd0, 0x53, 0xa9, 0x17, 0xcb, 0x0a, 0xbd, 0x64, 0xa9, 0x37, + 0xcb, 0x7c, 0x68, 0x00, 0xc5, 0x68, 0xd4, 0xa6, 0x1e, 0x8d, 0xa5, 0xd0, 0x5f, 0x7d, 0x94, 0x6f, + 0x95, 0xf8, 0x9e, 0x76, 0xd4, 0x9f, 0xa0, 0xc7, 0x7f, 0x04, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x16, + 0xa3, 0xa0, 0x10, 0x0d, 0x00, 0x00, } diff --git a/internal/pb/pb.proto b/internal/pb/pb.proto index 8f95de7e..1ec96fd5 100644 --- a/internal/pb/pb.proto +++ b/internal/pb/pb.proto @@ -33,6 +33,11 @@ message BurndownSparseMatrix { repeated BurndownSparseMatrixRow rows = 4; } +message FilesOwnership { + // The sum always equals to the total number of lines in the file. + map value = 1; +} + message BurndownAnalysisResults { // how many days are in each band [burndown_project, burndown_file, burndown_developer] int32 granularity = 1; @@ -40,12 +45,14 @@ message BurndownAnalysisResults { int32 sampling = 2; // always exists BurndownSparseMatrix project = 3; - // this is included if `-burndown-files` was specified + // this is included if `--burndown-files` was specified repeated BurndownSparseMatrix files = 4; - // these two are included if `-burndown-people` was specified + // these two are included if `--burndown-people` was specified repeated BurndownSparseMatrix people = 5; // rows and cols order correspond to `burndown_developer` CompressedSparseRowMatrix people_interaction = 6; + // How many lines belong to relevant developers for each file. The order is the same as in `files`. + repeated FilesOwnership files_ownership = 7; } message CompressedSparseRowMatrix { diff --git a/internal/pb/pb_pb2.py b/internal/pb/pb_pb2.py index 8588af4b..9f99b66c 100644 --- a/internal/pb/pb_pb2.py +++ b/internal/pb/pb_pb2.py @@ -19,7 +19,7 @@ package='', syntax='proto3', serialized_options=None, - serialized_pb=_b('\n\x08pb.proto\"\x81\x02\n\x08Metadata\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12\x0c\n\x04hash\x18\x02 \x01(\t\x12\x12\n\nrepository\x18\x03 \x01(\t\x12\x17\n\x0f\x62\x65gin_unix_time\x18\x04 \x01(\x03\x12\x15\n\rend_unix_time\x18\x05 \x01(\x03\x12\x0f\n\x07\x63ommits\x18\x06 \x01(\x05\x12\x10\n\x08run_time\x18\x07 \x01(\x03\x12\x38\n\x11run_time_per_item\x18\x08 \x03(\x0b\x32\x1d.Metadata.RunTimePerItemEntry\x1a\x35\n\x13RunTimePerItemEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\"*\n\x17\x42urndownSparseMatrixRow\x12\x0f\n\x07\x63olumns\x18\x01 \x03(\r\"\x7f\n\x14\x42urndownSparseMatrix\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\x0enumber_of_rows\x18\x02 \x01(\x05\x12\x19\n\x11number_of_columns\x18\x03 \x01(\x05\x12&\n\x04rows\x18\x04 \x03(\x0b\x32\x18.BurndownSparseMatrixRow\"\xed\x01\n\x17\x42urndownAnalysisResults\x12\x13\n\x0bgranularity\x18\x01 \x01(\x05\x12\x10\n\x08sampling\x18\x02 \x01(\x05\x12&\n\x07project\x18\x03 \x01(\x0b\x32\x15.BurndownSparseMatrix\x12$\n\x05\x66iles\x18\x04 \x03(\x0b\x32\x15.BurndownSparseMatrix\x12%\n\x06people\x18\x05 \x03(\x0b\x32\x15.BurndownSparseMatrix\x12\x36\n\x12people_interaction\x18\x06 \x01(\x0b\x32\x1a.CompressedSparseRowMatrix\"}\n\x19\x43ompressedSparseRowMatrix\x12\x16\n\x0enumber_of_rows\x18\x01 \x01(\x05\x12\x19\n\x11number_of_columns\x18\x02 \x01(\x05\x12\x0c\n\x04\x64\x61ta\x18\x03 \x03(\x03\x12\x0f\n\x07indices\x18\x04 \x03(\x05\x12\x0e\n\x06indptr\x18\x05 \x03(\x03\"D\n\x07\x43ouples\x12\r\n\x05index\x18\x01 \x03(\t\x12*\n\x06matrix\x18\x02 \x01(\x0b\x32\x1a.CompressedSparseRowMatrix\"\x1d\n\x0cTouchedFiles\x12\r\n\x05\x66iles\x18\x01 \x03(\x05\"\x94\x01\n\x16\x43ouplesAnalysisResults\x12\x1e\n\x0c\x66ile_couples\x18\x06 \x01(\x0b\x32\x08.Couples\x12 \n\x0epeople_couples\x18\x07 \x01(\x0b\x32\x08.Couples\x12#\n\x0cpeople_files\x18\x08 \x03(\x0b\x32\r.TouchedFiles\x12\x13\n\x0b\x66iles_lines\x18\t \x03(\x05\"o\n\nUASTChange\x12\x11\n\tfile_name\x18\x01 \x01(\t\x12\x12\n\nsrc_before\x18\x02 \x01(\t\x12\x11\n\tsrc_after\x18\x03 \x01(\t\x12\x13\n\x0buast_before\x18\x04 \x01(\t\x12\x12\n\nuast_after\x18\x05 \x01(\t\"7\n\x17UASTChangesSaverResults\x12\x1c\n\x07\x63hanges\x18\x01 \x03(\x0b\x32\x0b.UASTChange\"\x9c\x01\n\x0eShotnessRecord\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04\x66ile\x18\x03 \x01(\t\x12/\n\x08\x63ounters\x18\x04 \x03(\x0b\x32\x1d.ShotnessRecord.CountersEntry\x1a/\n\rCountersEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\";\n\x17ShotnessAnalysisResults\x12 \n\x07records\x18\x01 \x03(\x0b\x32\x0f.ShotnessRecord\"\x1e\n\x0b\x46ileHistory\x12\x0f\n\x07\x63ommits\x18\x01 \x03(\t\"\x8b\x01\n\x18\x46ileHistoryResultMessage\x12\x33\n\x05\x66iles\x18\x01 \x03(\x0b\x32$.FileHistoryResultMessage.FilesEntry\x1a:\n\nFilesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1b\n\x05value\x18\x02 \x01(\x0b\x32\x0c.FileHistory:\x02\x38\x01\"<\n\tLineStats\x12\r\n\x05\x61\x64\x64\x65\x64\x18\x01 \x01(\x05\x12\x0f\n\x07removed\x18\x02 \x01(\x05\x12\x0f\n\x07\x63hanged\x18\x03 \x01(\x05\"\x9d\x01\n\x06\x44\x65vDay\x12\x0f\n\x07\x63ommits\x18\x01 \x01(\x05\x12\x19\n\x05stats\x18\x02 \x01(\x0b\x32\n.LineStats\x12)\n\tlanguages\x18\x03 \x03(\x0b\x32\x16.DevDay.LanguagesEntry\x1a<\n\x0eLanguagesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.LineStats:\x02\x38\x01\"a\n\x07\x44\x61yDevs\x12 \n\x04\x64\x65vs\x18\x01 \x03(\x0b\x32\x12.DayDevs.DevsEntry\x1a\x34\n\tDevsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x16\n\x05value\x18\x02 \x01(\x0b\x32\x07.DevDay:\x02\x38\x01\"\x8d\x01\n\x13\x44\x65vsAnalysisResults\x12,\n\x04\x64\x61ys\x18\x01 \x03(\x0b\x32\x1e.DevsAnalysisResults.DaysEntry\x12\x11\n\tdev_index\x18\x02 \x03(\t\x1a\x35\n\tDaysEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x17\n\x05value\x18\x02 \x01(\x0b\x32\x08.DayDevs:\x02\x38\x01\"=\n\tSentiment\x12\r\n\x05value\x18\x01 \x01(\x02\x12\x10\n\x08\x63omments\x18\x02 \x03(\t\x12\x0f\n\x07\x63ommits\x18\x03 \x03(\t\"\xa4\x01\n\x17\x43ommentSentimentResults\x12\x46\n\x10sentiment_by_day\x18\x01 \x03(\x0b\x32,.CommentSentimentResults.SentimentByDayEntry\x1a\x41\n\x13SentimentByDayEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.Sentiment:\x02\x38\x01\"\x8f\x01\n\x0f\x41nalysisResults\x12\x19\n\x06header\x18\x01 \x01(\x0b\x32\t.Metadata\x12\x30\n\x08\x63ontents\x18\x02 \x03(\x0b\x32\x1e.AnalysisResults.ContentsEntry\x1a/\n\rContentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x62\x06proto3') + serialized_pb=_b('\n\x08pb.proto\"\x81\x02\n\x08Metadata\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12\x0c\n\x04hash\x18\x02 \x01(\t\x12\x12\n\nrepository\x18\x03 \x01(\t\x12\x17\n\x0f\x62\x65gin_unix_time\x18\x04 \x01(\x03\x12\x15\n\rend_unix_time\x18\x05 \x01(\x03\x12\x0f\n\x07\x63ommits\x18\x06 \x01(\x05\x12\x10\n\x08run_time\x18\x07 \x01(\x03\x12\x38\n\x11run_time_per_item\x18\x08 \x03(\x0b\x32\x1d.Metadata.RunTimePerItemEntry\x1a\x35\n\x13RunTimePerItemEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\"*\n\x17\x42urndownSparseMatrixRow\x12\x0f\n\x07\x63olumns\x18\x01 \x03(\r\"\x7f\n\x14\x42urndownSparseMatrix\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\x0enumber_of_rows\x18\x02 \x01(\x05\x12\x19\n\x11number_of_columns\x18\x03 \x01(\x05\x12&\n\x04rows\x18\x04 \x03(\x0b\x32\x18.BurndownSparseMatrixRow\"i\n\x0e\x46ilesOwnership\x12)\n\x05value\x18\x01 \x03(\x0b\x32\x1a.FilesOwnership.ValueEntry\x1a,\n\nValueEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\"\x97\x02\n\x17\x42urndownAnalysisResults\x12\x13\n\x0bgranularity\x18\x01 \x01(\x05\x12\x10\n\x08sampling\x18\x02 \x01(\x05\x12&\n\x07project\x18\x03 \x01(\x0b\x32\x15.BurndownSparseMatrix\x12$\n\x05\x66iles\x18\x04 \x03(\x0b\x32\x15.BurndownSparseMatrix\x12%\n\x06people\x18\x05 \x03(\x0b\x32\x15.BurndownSparseMatrix\x12\x36\n\x12people_interaction\x18\x06 \x01(\x0b\x32\x1a.CompressedSparseRowMatrix\x12(\n\x0f\x66iles_ownership\x18\x07 \x03(\x0b\x32\x0f.FilesOwnership\"}\n\x19\x43ompressedSparseRowMatrix\x12\x16\n\x0enumber_of_rows\x18\x01 \x01(\x05\x12\x19\n\x11number_of_columns\x18\x02 \x01(\x05\x12\x0c\n\x04\x64\x61ta\x18\x03 \x03(\x03\x12\x0f\n\x07indices\x18\x04 \x03(\x05\x12\x0e\n\x06indptr\x18\x05 \x03(\x03\"D\n\x07\x43ouples\x12\r\n\x05index\x18\x01 \x03(\t\x12*\n\x06matrix\x18\x02 \x01(\x0b\x32\x1a.CompressedSparseRowMatrix\"\x1d\n\x0cTouchedFiles\x12\r\n\x05\x66iles\x18\x01 \x03(\x05\"\x94\x01\n\x16\x43ouplesAnalysisResults\x12\x1e\n\x0c\x66ile_couples\x18\x06 \x01(\x0b\x32\x08.Couples\x12 \n\x0epeople_couples\x18\x07 \x01(\x0b\x32\x08.Couples\x12#\n\x0cpeople_files\x18\x08 \x03(\x0b\x32\r.TouchedFiles\x12\x13\n\x0b\x66iles_lines\x18\t \x03(\x05\"o\n\nUASTChange\x12\x11\n\tfile_name\x18\x01 \x01(\t\x12\x12\n\nsrc_before\x18\x02 \x01(\t\x12\x11\n\tsrc_after\x18\x03 \x01(\t\x12\x13\n\x0buast_before\x18\x04 \x01(\t\x12\x12\n\nuast_after\x18\x05 \x01(\t\"7\n\x17UASTChangesSaverResults\x12\x1c\n\x07\x63hanges\x18\x01 \x03(\x0b\x32\x0b.UASTChange\"\x9c\x01\n\x0eShotnessRecord\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04\x66ile\x18\x03 \x01(\t\x12/\n\x08\x63ounters\x18\x04 \x03(\x0b\x32\x1d.ShotnessRecord.CountersEntry\x1a/\n\rCountersEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\";\n\x17ShotnessAnalysisResults\x12 \n\x07records\x18\x01 \x03(\x0b\x32\x0f.ShotnessRecord\"\x1e\n\x0b\x46ileHistory\x12\x0f\n\x07\x63ommits\x18\x01 \x03(\t\"\x8b\x01\n\x18\x46ileHistoryResultMessage\x12\x33\n\x05\x66iles\x18\x01 \x03(\x0b\x32$.FileHistoryResultMessage.FilesEntry\x1a:\n\nFilesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1b\n\x05value\x18\x02 \x01(\x0b\x32\x0c.FileHistory:\x02\x38\x01\"<\n\tLineStats\x12\r\n\x05\x61\x64\x64\x65\x64\x18\x01 \x01(\x05\x12\x0f\n\x07removed\x18\x02 \x01(\x05\x12\x0f\n\x07\x63hanged\x18\x03 \x01(\x05\"\x9d\x01\n\x06\x44\x65vDay\x12\x0f\n\x07\x63ommits\x18\x01 \x01(\x05\x12\x19\n\x05stats\x18\x02 \x01(\x0b\x32\n.LineStats\x12)\n\tlanguages\x18\x03 \x03(\x0b\x32\x16.DevDay.LanguagesEntry\x1a<\n\x0eLanguagesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.LineStats:\x02\x38\x01\"a\n\x07\x44\x61yDevs\x12 \n\x04\x64\x65vs\x18\x01 \x03(\x0b\x32\x12.DayDevs.DevsEntry\x1a\x34\n\tDevsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x16\n\x05value\x18\x02 \x01(\x0b\x32\x07.DevDay:\x02\x38\x01\"\x8d\x01\n\x13\x44\x65vsAnalysisResults\x12,\n\x04\x64\x61ys\x18\x01 \x03(\x0b\x32\x1e.DevsAnalysisResults.DaysEntry\x12\x11\n\tdev_index\x18\x02 \x03(\t\x1a\x35\n\tDaysEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x17\n\x05value\x18\x02 \x01(\x0b\x32\x08.DayDevs:\x02\x38\x01\"=\n\tSentiment\x12\r\n\x05value\x18\x01 \x01(\x02\x12\x10\n\x08\x63omments\x18\x02 \x03(\t\x12\x0f\n\x07\x63ommits\x18\x03 \x03(\t\"\xa4\x01\n\x17\x43ommentSentimentResults\x12\x46\n\x10sentiment_by_day\x18\x01 \x03(\x0b\x32,.CommentSentimentResults.SentimentByDayEntry\x1a\x41\n\x13SentimentByDayEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.Sentiment:\x02\x38\x01\"\x8f\x01\n\x0f\x41nalysisResults\x12\x19\n\x06header\x18\x01 \x01(\x0b\x32\t.Metadata\x12\x30\n\x08\x63ontents\x18\x02 \x03(\x0b\x32\x1e.AnalysisResults.ContentsEntry\x1a/\n\rContentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x62\x06proto3') ) @@ -225,6 +225,74 @@ ) +_FILESOWNERSHIP_VALUEENTRY = _descriptor.Descriptor( + name='ValueEntry', + full_name='FilesOwnership.ValueEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='FilesOwnership.ValueEntry.key', index=0, + number=1, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='FilesOwnership.ValueEntry.value', index=1, + number=2, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=_b('8\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=506, + serialized_end=550, +) + +_FILESOWNERSHIP = _descriptor.Descriptor( + name='FilesOwnership', + full_name='FilesOwnership', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='value', full_name='FilesOwnership.value', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_FILESOWNERSHIP_VALUEENTRY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=445, + serialized_end=550, +) + + _BURNDOWNANALYSISRESULTS = _descriptor.Descriptor( name='BurndownAnalysisResults', full_name='BurndownAnalysisResults', @@ -274,6 +342,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='files_ownership', full_name='BurndownAnalysisResults.files_ownership', index=6, + number=7, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -286,8 +361,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=446, - serialized_end=683, + serialized_start=553, + serialized_end=832, ) @@ -345,8 +420,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=685, - serialized_end=810, + serialized_start=834, + serialized_end=959, ) @@ -383,8 +458,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=812, - serialized_end=880, + serialized_start=961, + serialized_end=1029, ) @@ -414,8 +489,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=882, - serialized_end=911, + serialized_start=1031, + serialized_end=1060, ) @@ -466,8 +541,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=914, - serialized_end=1062, + serialized_start=1063, + serialized_end=1211, ) @@ -525,8 +600,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1064, - serialized_end=1175, + serialized_start=1213, + serialized_end=1324, ) @@ -556,8 +631,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1177, - serialized_end=1232, + serialized_start=1326, + serialized_end=1381, ) @@ -594,8 +669,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1344, - serialized_end=1391, + serialized_start=1493, + serialized_end=1540, ) _SHOTNESSRECORD = _descriptor.Descriptor( @@ -645,8 +720,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1235, - serialized_end=1391, + serialized_start=1384, + serialized_end=1540, ) @@ -676,8 +751,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1393, - serialized_end=1452, + serialized_start=1542, + serialized_end=1601, ) @@ -707,8 +782,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1454, - serialized_end=1484, + serialized_start=1603, + serialized_end=1633, ) @@ -745,8 +820,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1568, - serialized_end=1626, + serialized_start=1717, + serialized_end=1775, ) _FILEHISTORYRESULTMESSAGE = _descriptor.Descriptor( @@ -775,8 +850,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1487, - serialized_end=1626, + serialized_start=1636, + serialized_end=1775, ) @@ -820,8 +895,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1628, - serialized_end=1688, + serialized_start=1777, + serialized_end=1837, ) @@ -858,8 +933,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1788, - serialized_end=1848, + serialized_start=1937, + serialized_end=1997, ) _DEVDAY = _descriptor.Descriptor( @@ -902,8 +977,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1691, - serialized_end=1848, + serialized_start=1840, + serialized_end=1997, ) @@ -940,8 +1015,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1895, - serialized_end=1947, + serialized_start=2044, + serialized_end=2096, ) _DAYDEVS = _descriptor.Descriptor( @@ -970,8 +1045,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1850, - serialized_end=1947, + serialized_start=1999, + serialized_end=2096, ) @@ -1008,8 +1083,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2038, - serialized_end=2091, + serialized_start=2187, + serialized_end=2240, ) _DEVSANALYSISRESULTS = _descriptor.Descriptor( @@ -1045,8 +1120,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1950, - serialized_end=2091, + serialized_start=2099, + serialized_end=2240, ) @@ -1090,8 +1165,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2093, - serialized_end=2154, + serialized_start=2242, + serialized_end=2303, ) @@ -1128,8 +1203,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2256, - serialized_end=2321, + serialized_start=2405, + serialized_end=2470, ) _COMMENTSENTIMENTRESULTS = _descriptor.Descriptor( @@ -1158,8 +1233,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2157, - serialized_end=2321, + serialized_start=2306, + serialized_end=2470, ) @@ -1196,8 +1271,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2420, - serialized_end=2467, + serialized_start=2569, + serialized_end=2616, ) _ANALYSISRESULTS = _descriptor.Descriptor( @@ -1233,17 +1308,20 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2324, - serialized_end=2467, + serialized_start=2473, + serialized_end=2616, ) _METADATA_RUNTIMEPERITEMENTRY.containing_type = _METADATA _METADATA.fields_by_name['run_time_per_item'].message_type = _METADATA_RUNTIMEPERITEMENTRY _BURNDOWNSPARSEMATRIX.fields_by_name['rows'].message_type = _BURNDOWNSPARSEMATRIXROW +_FILESOWNERSHIP_VALUEENTRY.containing_type = _FILESOWNERSHIP +_FILESOWNERSHIP.fields_by_name['value'].message_type = _FILESOWNERSHIP_VALUEENTRY _BURNDOWNANALYSISRESULTS.fields_by_name['project'].message_type = _BURNDOWNSPARSEMATRIX _BURNDOWNANALYSISRESULTS.fields_by_name['files'].message_type = _BURNDOWNSPARSEMATRIX _BURNDOWNANALYSISRESULTS.fields_by_name['people'].message_type = _BURNDOWNSPARSEMATRIX _BURNDOWNANALYSISRESULTS.fields_by_name['people_interaction'].message_type = _COMPRESSEDSPARSEROWMATRIX +_BURNDOWNANALYSISRESULTS.fields_by_name['files_ownership'].message_type = _FILESOWNERSHIP _COUPLES.fields_by_name['matrix'].message_type = _COMPRESSEDSPARSEROWMATRIX _COUPLESANALYSISRESULTS.fields_by_name['file_couples'].message_type = _COUPLES _COUPLESANALYSISRESULTS.fields_by_name['people_couples'].message_type = _COUPLES @@ -1274,6 +1352,7 @@ DESCRIPTOR.message_types_by_name['Metadata'] = _METADATA DESCRIPTOR.message_types_by_name['BurndownSparseMatrixRow'] = _BURNDOWNSPARSEMATRIXROW DESCRIPTOR.message_types_by_name['BurndownSparseMatrix'] = _BURNDOWNSPARSEMATRIX +DESCRIPTOR.message_types_by_name['FilesOwnership'] = _FILESOWNERSHIP DESCRIPTOR.message_types_by_name['BurndownAnalysisResults'] = _BURNDOWNANALYSISRESULTS DESCRIPTOR.message_types_by_name['CompressedSparseRowMatrix'] = _COMPRESSEDSPARSEROWMATRIX DESCRIPTOR.message_types_by_name['Couples'] = _COUPLES @@ -1323,6 +1402,21 @@ )) _sym_db.RegisterMessage(BurndownSparseMatrix) +FilesOwnership = _reflection.GeneratedProtocolMessageType('FilesOwnership', (_message.Message,), dict( + + ValueEntry = _reflection.GeneratedProtocolMessageType('ValueEntry', (_message.Message,), dict( + DESCRIPTOR = _FILESOWNERSHIP_VALUEENTRY, + __module__ = 'pb_pb2' + # @@protoc_insertion_point(class_scope:FilesOwnership.ValueEntry) + )) + , + DESCRIPTOR = _FILESOWNERSHIP, + __module__ = 'pb_pb2' + # @@protoc_insertion_point(class_scope:FilesOwnership) + )) +_sym_db.RegisterMessage(FilesOwnership) +_sym_db.RegisterMessage(FilesOwnership.ValueEntry) + BurndownAnalysisResults = _reflection.GeneratedProtocolMessageType('BurndownAnalysisResults', (_message.Message,), dict( DESCRIPTOR = _BURNDOWNANALYSISRESULTS, __module__ = 'pb_pb2' @@ -1507,6 +1601,7 @@ _METADATA_RUNTIMEPERITEMENTRY._options = None +_FILESOWNERSHIP_VALUEENTRY._options = None _SHOTNESSRECORD_COUNTERSENTRY._options = None _FILEHISTORYRESULTMESSAGE_FILESENTRY._options = None _DEVDAY_LANGUAGESENTRY._options = None diff --git a/internal/test_data/burndown.pb b/internal/test_data/burndown.pb index ed2bc483a92f67dc9c1bd7e688467921408209cb..8d04df2e9900e196b03cd4850b3156c7ab85c11b 100644 GIT binary patch delta 1864 zcmcJQO%8%U426SYf<%+q>p=_~b{@zJ^h|EOnhWeq9T>|{Dg_oK{LJg)>+A5oz3$J) z@e0kUE~~=r@Vs|rb4jo2bJfM8a0lZQt!QTEq=`f0Hy(08*pRZFK< zCOF5kfpT&iIs{9`f~71ZD<3+~Y#Ya4>6hz%0Ql#3Pyhe` delta 136 zcmdnx_S>SKD}jSaNW(nM*uvP-FfrA{*euoD#L~>z%+%1-%*Zr3#UMGwI5{oZ(9po# z)Lcq2qokyu*h*hNJ+maEG)XTxKUcrFC|Nf}KO?m$xilxWSYhkl-G^8;Zq4kz#A>jf o(IP`=ngth!Q)y9NN`85sP^SfloPeCvRz@!Nf};Gajl6%P0V7B&jQ{`u diff --git a/leaves/burndown.go b/leaves/burndown.go index eb19d013..f05d7dc3 100644 --- a/leaves/burndown.go +++ b/leaves/burndown.go @@ -111,9 +111,13 @@ type BurndownResult struct { // The number of samples depends on Sampling: the less Sampling, the bigger the number. // The number of bands depends on Granularity: the less Granularity, the bigger the number. GlobalHistory DenseHistory - // The key is the path inside the Git repository. The value's dimensions are the same as + // The key is a path inside the Git repository. The value's dimensions are the same as // in GlobalHistory. FileHistories map[string]DenseHistory + // The key is a path inside the Git repository. The value is a mapping from developer indexes + // (see reversedPeopleDict) and the owned line numbers. Their sum equals to the total number of + // lines in the file. + FileOwnership map[string]map[int]int // [number of people][number of samples][number of bands] PeopleHistories []DenseHistory // [number of people][number of people + 2] @@ -484,10 +488,28 @@ func (analyser *BurndownAnalysis) Boot() error { func (analyser *BurndownAnalysis) Finalize() interface{} { globalHistory, lastDay := analyser.groupSparseHistory(analyser.globalHistory, -1) fileHistories := map[string]DenseHistory{} + fileOwnership := map[string]map[int]int{} for key, history := range analyser.fileHistories { - if len(history) > 0 { - fileHistories[key], _ = analyser.groupSparseHistory(history, lastDay) + if len(history) == 0 { + continue } + fileHistories[key], _ = analyser.groupSparseHistory(history, lastDay) + file := analyser.files[key] + previousLine := 0 + previousAuthor := identity.AuthorMissing + ownership := map[int]int{} + fileOwnership[key] = ownership + file.ForEach(func(line, value int) { + length := line - previousLine + if length > 0 { + ownership[previousAuthor] += length + } + previousLine = line + previousAuthor, _ = analyser.unpackPersonWithDay(int(value)) + if previousAuthor == identity.AuthorMissing { + previousAuthor = -1 + } + }) } peopleHistories := make([]DenseHistory, analyser.PeopleNumber) for i, history := range analyser.peopleHistories { @@ -520,6 +542,7 @@ func (analyser *BurndownAnalysis) Finalize() interface{} { return BurndownResult{ GlobalHistory: globalHistory, FileHistories: fileHistories, + FileOwnership: fileOwnership, PeopleHistories: peopleHistories, PeopleMatrix: peopleMatrix, reversedPeopleDict: analyser.reversedPeopleDict, @@ -559,8 +582,14 @@ func (analyser *BurndownAnalysis) Deserialize(pbmessage []byte) (interface{}, er } result.GlobalHistory = convertCSR(msg.Project) result.FileHistories = map[string]DenseHistory{} - for _, mat := range msg.Files { + result.FileOwnership = map[string]map[int]int{} + for i, mat := range msg.Files { result.FileHistories[mat.Name] = convertCSR(mat) + ownership := map[int]int{} + result.FileOwnership[mat.Name] = ownership + for key, val := range msg.FilesOwnership[i].Value { + ownership[int(key)] = int(val) + } } result.reversedPeopleDict = make([]string, len(msg.People)) result.PeopleHistories = make([]DenseHistory, len(msg.People)) @@ -613,6 +642,7 @@ func (analyser *BurndownAnalysis) MergeResults( c1, c2) }() } + // we don't merge files if len(merged.reversedPeopleDict) > 0 { if len(bar1.PeopleHistories) > 0 || len(bar2.PeopleHistories) > 0 { merged.PeopleHistories = make([]DenseHistory, len(merged.reversedPeopleDict)) @@ -924,6 +954,31 @@ func (analyser *BurndownAnalysis) serializeText(result *BurndownResult, writer i for _, key := range keys { yaml.PrintMatrix(writer, result.FileHistories[key], 4, key, true) } + fmt.Fprintln(writer, " files_ownership:") + okeys := make([]string, 0, len(result.FileOwnership)) + for key := range result.FileOwnership { + okeys = append(okeys, key) + } + sort.Strings(okeys) + for _, key := range okeys { + owned := result.FileOwnership[key] + devs := make([]int, 0, len(owned)) + for devi := range owned { + devs = append(devs, devi) + } + sort.Slice(devs, func(i, j int) bool { + return owned[devs[i]] > owned[devs[j]] // descending order + }) + for x, devi := range devs { + var indent string + if x == 0 { + indent = "- " + } else { + indent = " " + } + fmt.Fprintf(writer, " %s%d: %d\n", indent, devi, owned[devi]) + } + } } if len(result.PeopleHistories) > 0 { @@ -950,11 +1005,16 @@ func (analyser *BurndownAnalysis) serializeBinary(result *BurndownResult, writer } if len(result.FileHistories) > 0 { message.Files = make([]*pb.BurndownSparseMatrix, len(result.FileHistories)) + message.FilesOwnership = make([]*pb.FilesOwnership, len(result.FileHistories)) keys := sortedKeys(result.FileHistories) i := 0 for _, key := range keys { - message.Files[i] = pb.ToBurndownSparseMatrix( - result.FileHistories[key], key) + message.Files[i] = pb.ToBurndownSparseMatrix(result.FileHistories[key], key) + ownership := map[int32]int32{} + message.FilesOwnership[i] = &pb.FilesOwnership{Value: ownership} + for key, val := range result.FileOwnership[key] { + ownership[int32(key)] = int32(val) + } i++ } } diff --git a/leaves/burndown_test.go b/leaves/burndown_test.go index 989d7aba..5a13b078 100644 --- a/leaves/burndown_test.go +++ b/leaves/burndown_test.go @@ -316,10 +316,11 @@ func TestBurndownConsumeFinalize(t *testing.T) { assert.Len(t, bd.fileHistories, 2) out := bd.Finalize().(BurndownResult) /* - GlobalHistory [][]int64 - FileHistories map[string][][]int64 - PeopleHistories [][][]int64 - PeopleMatrix [][]int64 + GlobalHistory [][]int64 + FileHistories map[string][][]int64 + FileOwnership map[string]map[int]int + PeopleHistories [][][]int64 + PeopleMatrix [][]int64 */ assert.Len(t, out.GlobalHistory, 2) for i := 0; i < 2; i++ { @@ -335,6 +336,9 @@ func TestBurndownConsumeFinalize(t *testing.T) { assert.Len(t, out.FileHistories["burndown.go"], 2) assert.Len(t, out.FileHistories["cmd/hercules/main.go"][0], 2) assert.Len(t, out.FileHistories["burndown.go"][0], 2) + assert.Len(t, out.FileOwnership, 2) + assert.Equal(t, out.FileOwnership["cmd/hercules/main.go"], map[int]int{0: 171, 1: 119}) + assert.Equal(t, out.FileOwnership["burndown.go"], map[int]int{0: 293, 1: 250}) assert.Len(t, out.PeopleMatrix, 2) assert.Len(t, out.PeopleMatrix[0], 4) assert.Len(t, out.PeopleMatrix[1], 4) @@ -621,6 +625,11 @@ func TestBurndownSerialize(t *testing.T) { "cmd/hercules/main.go": |- 207 0 171 119 + files_ownership: + - 0: 293 + 1: 250 + - 0: 171 + 1: 119 people_sequence: - "one@srcd" - "two@srcd" @@ -659,6 +668,9 @@ func TestBurndownSerialize(t *testing.T) { assert.Len(t, msg.Files[0].Rows[1].Columns, 2) assert.Equal(t, msg.Files[0].Rows[1].Columns[0], uint32(293)) assert.Equal(t, msg.Files[0].Rows[1].Columns[1], uint32(250)) + assert.Len(t, msg.FilesOwnership, 2) + assert.Equal(t, msg.FilesOwnership[0].Value, map[int32]int32{0: 293, 1: 250}) + assert.Equal(t, msg.FilesOwnership[1].Value, map[int32]int32{0: 171, 1: 119}) assert.Len(t, msg.People, 2) assert.Equal(t, msg.People[0].Name, "one@srcd") assert.Equal(t, msg.People[1].Name, "two@srcd") @@ -700,6 +712,11 @@ func TestBurndownSerializeAuthorMissing(t *testing.T) { "cmd/hercules/main.go": |- 207 0 171 119 + files_ownership: + - 0: 293 + -1: 250 + - 0: 171 + -1: 119 people_sequence: - "one@srcd" - "two@srcd" @@ -738,6 +755,9 @@ func TestBurndownSerializeAuthorMissing(t *testing.T) { assert.Len(t, msg.Files[0].Rows[1].Columns, 2) assert.Equal(t, msg.Files[0].Rows[1].Columns[0], uint32(293)) assert.Equal(t, msg.Files[0].Rows[1].Columns[1], uint32(250)) + assert.Len(t, msg.FilesOwnership, 2) + assert.Equal(t, msg.FilesOwnership[0].Value, map[int32]int32{0: 293, -1: 250}) + assert.Equal(t, msg.FilesOwnership[1].Value, map[int32]int32{0: 171, -1: 119}) assert.Len(t, msg.People, 2) assert.Equal(t, msg.People[0].Name, "one@srcd") assert.Equal(t, msg.People[1].Name, "two@srcd") @@ -1255,15 +1275,13 @@ func TestBurndownMergeNils(t *testing.T) { func TestBurndownDeserialize(t *testing.T) { allBuffer, err := ioutil.ReadFile(path.Join("..", "internal", "test_data", "burndown.pb")) assert.Nil(t, err) - message := pb.AnalysisResults{} - err = proto.Unmarshal(allBuffer, &message) - assert.Nil(t, err) bd := BurndownAnalysis{} - iresult, err := bd.Deserialize(message.Contents[bd.Name()]) + iresult, err := bd.Deserialize(allBuffer) assert.Nil(t, err) result := iresult.(BurndownResult) assert.True(t, len(result.GlobalHistory) > 0) assert.True(t, len(result.FileHistories) > 0) + assert.Equal(t, len(result.FileOwnership), len(result.FileHistories)) assert.True(t, len(result.reversedPeopleDict) > 0) assert.True(t, len(result.PeopleHistories) > 0) assert.True(t, len(result.PeopleMatrix) > 0)