From 8c012d1ee286e6adca95e597b47b035828bcc266 Mon Sep 17 00:00:00 2001 From: Vadim Markovtsev Date: Tue, 24 Dec 2019 11:08:09 +0100 Subject: [PATCH] Change --imports-per-dev to return imports through time Signed-off-by: Vadim Markovtsev --- internal/pb/pb.pb.go | 299 +++++++++++++++++++-------------- internal/pb/pb.proto | 8 +- leaves/burndown.go | 23 +-- leaves/burndown_test.go | 18 +- leaves/devs.go | 4 +- leaves/imports_printer.go | 110 +++++++++--- leaves/imports_printer_test.go | 74 ++++---- python/labours/pb_pb2.py | 155 +++++++++++++---- python/setup.py | 2 +- 9 files changed, 459 insertions(+), 234 deletions(-) diff --git a/internal/pb/pb.pb.go b/internal/pb/pb.pb.go index 49d461c2..47941228 100644 --- a/internal/pb/pb.pb.go +++ b/internal/pb/pb.pb.go @@ -1443,18 +1443,56 @@ func (m *TyposDataset) GetTypos() []*Typo { return nil } +type ImportsPerTick struct { + Counts map[int32]int64 `protobuf:"bytes,1,rep,name=counts,proto3" json:"counts,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ImportsPerTick) Reset() { *m = ImportsPerTick{} } +func (m *ImportsPerTick) String() string { return proto.CompactTextString(m) } +func (*ImportsPerTick) ProtoMessage() {} +func (*ImportsPerTick) Descriptor() ([]byte, []int) { + return fileDescriptor_f80abaa17e25ccc8, []int{26} +} +func (m *ImportsPerTick) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ImportsPerTick.Unmarshal(m, b) +} +func (m *ImportsPerTick) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ImportsPerTick.Marshal(b, m, deterministic) +} +func (m *ImportsPerTick) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportsPerTick.Merge(m, src) +} +func (m *ImportsPerTick) XXX_Size() int { + return xxx_messageInfo_ImportsPerTick.Size(m) +} +func (m *ImportsPerTick) XXX_DiscardUnknown() { + xxx_messageInfo_ImportsPerTick.DiscardUnknown(m) +} + +var xxx_messageInfo_ImportsPerTick proto.InternalMessageInfo + +func (m *ImportsPerTick) GetCounts() map[int32]int64 { + if m != nil { + return m.Counts + } + return nil +} + type ImportsPerLanguage struct { - Counts map[string]int64 `protobuf:"bytes,1,rep,name=counts,proto3" json:"counts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Ticks map[string]*ImportsPerTick `protobuf:"bytes,1,rep,name=ticks,proto3" json:"ticks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ImportsPerLanguage) Reset() { *m = ImportsPerLanguage{} } func (m *ImportsPerLanguage) String() string { return proto.CompactTextString(m) } func (*ImportsPerLanguage) ProtoMessage() {} func (*ImportsPerLanguage) Descriptor() ([]byte, []int) { - return fileDescriptor_f80abaa17e25ccc8, []int{26} + return fileDescriptor_f80abaa17e25ccc8, []int{27} } func (m *ImportsPerLanguage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportsPerLanguage.Unmarshal(m, b) @@ -1474,9 +1512,9 @@ func (m *ImportsPerLanguage) XXX_DiscardUnknown() { var xxx_messageInfo_ImportsPerLanguage proto.InternalMessageInfo -func (m *ImportsPerLanguage) GetCounts() map[string]int64 { +func (m *ImportsPerLanguage) GetTicks() map[string]*ImportsPerTick { if m != nil { - return m.Counts + return m.Ticks } return nil } @@ -1492,7 +1530,7 @@ func (m *ImportsPerDeveloper) Reset() { *m = ImportsPerDeveloper{} } func (m *ImportsPerDeveloper) String() string { return proto.CompactTextString(m) } func (*ImportsPerDeveloper) ProtoMessage() {} func (*ImportsPerDeveloper) Descriptor() ([]byte, []int) { - return fileDescriptor_f80abaa17e25ccc8, []int{27} + return fileDescriptor_f80abaa17e25ccc8, []int{28} } func (m *ImportsPerDeveloper) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportsPerDeveloper.Unmarshal(m, b) @@ -1520,18 +1558,20 @@ func (m *ImportsPerDeveloper) GetLanguages() map[string]*ImportsPerLanguage { } type ImportsPerDeveloperResults struct { - Imports []*ImportsPerDeveloper `protobuf:"bytes,1,rep,name=imports,proto3" json:"imports,omitempty"` - AuthorIndex []string `protobuf:"bytes,2,rep,name=author_index,json=authorIndex,proto3" json:"author_index,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Imports []*ImportsPerDeveloper `protobuf:"bytes,1,rep,name=imports,proto3" json:"imports,omitempty"` + AuthorIndex []string `protobuf:"bytes,2,rep,name=author_index,json=authorIndex,proto3" json:"author_index,omitempty"` + // how long each tick is, as an int64 nanosecond count (Go's time.Duration) + TickSize int64 `protobuf:"varint,3,opt,name=tick_size,json=tickSize,proto3" json:"tick_size,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ImportsPerDeveloperResults) Reset() { *m = ImportsPerDeveloperResults{} } func (m *ImportsPerDeveloperResults) String() string { return proto.CompactTextString(m) } func (*ImportsPerDeveloperResults) ProtoMessage() {} func (*ImportsPerDeveloperResults) Descriptor() ([]byte, []int) { - return fileDescriptor_f80abaa17e25ccc8, []int{28} + return fileDescriptor_f80abaa17e25ccc8, []int{29} } func (m *ImportsPerDeveloperResults) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportsPerDeveloperResults.Unmarshal(m, b) @@ -1565,6 +1605,13 @@ func (m *ImportsPerDeveloperResults) GetAuthorIndex() []string { return nil } +func (m *ImportsPerDeveloperResults) GetTickSize() int64 { + if m != nil { + return m.TickSize + } + return 0 +} + type AnalysisResults struct { Header *Metadata `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` // the mapped values are dynamic messages which require the second parsing pass. @@ -1578,7 +1625,7 @@ func (m *AnalysisResults) Reset() { *m = AnalysisResults{} } func (m *AnalysisResults) String() string { return proto.CompactTextString(m) } func (*AnalysisResults) ProtoMessage() {} func (*AnalysisResults) Descriptor() ([]byte, []int) { - return fileDescriptor_f80abaa17e25ccc8, []int{29} + return fileDescriptor_f80abaa17e25ccc8, []int{30} } func (m *AnalysisResults) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AnalysisResults.Unmarshal(m, b) @@ -1648,8 +1695,10 @@ func init() { proto.RegisterType((*CommitsAnalysisResults)(nil), "CommitsAnalysisResults") proto.RegisterType((*Typo)(nil), "Typo") proto.RegisterType((*TyposDataset)(nil), "TyposDataset") + proto.RegisterType((*ImportsPerTick)(nil), "ImportsPerTick") + proto.RegisterMapType((map[int32]int64)(nil), "ImportsPerTick.CountsEntry") proto.RegisterType((*ImportsPerLanguage)(nil), "ImportsPerLanguage") - proto.RegisterMapType((map[string]int64)(nil), "ImportsPerLanguage.CountsEntry") + proto.RegisterMapType((map[string]*ImportsPerTick)(nil), "ImportsPerLanguage.TicksEntry") proto.RegisterType((*ImportsPerDeveloper)(nil), "ImportsPerDeveloper") proto.RegisterMapType((map[string]*ImportsPerLanguage)(nil), "ImportsPerDeveloper.LanguagesEntry") proto.RegisterType((*ImportsPerDeveloperResults)(nil), "ImportsPerDeveloperResults") @@ -1660,112 +1709,114 @@ func init() { func init() { proto.RegisterFile("pb.proto", fileDescriptor_f80abaa17e25ccc8) } var fileDescriptor_f80abaa17e25ccc8 = []byte{ - // 1699 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x58, 0xcd, 0x6e, 0x1b, 0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e9, 0x63, 0xcb, 0x02, - 0xb8, 0xaa, 0x81, 0x7d, 0xa9, 0x46, 0xff, 0x84, 0x8a, 0xd8, 0xa7, 0x22, 0x38, 0x33, 0xed, 0x73, - 0x02, 0x70, 0x04, 0xca, 0xfa, 0x1c, 0x3a, 0x4f, 0xfc, 0x09, 0x66, 0x2f, 0xe7, 0x04, 0x53, 0x36, - 0xf6, 0x43, 0x74, 0x4f, 0xb3, 0x61, 0x88, 0x0d, 0xba, 0x76, 0xde, 0x6e, 0xbf, 0xe5, 0x46, 0xc9, - 0xb8, 0x04, 0x76, 0x1f, 0x02, 0xa4, 0xca, 0x2c, 0xbf, 0xd5, 0x02, 0x7e, 0xab, 0x59, 0x7e, 0xbf, - 0x2c, 0xa7, 0x04, 0xef, 0x11, 0x77, 0xb2, 0x60, 0x3e, 0x73, 0x30, 0x8b, 0x27, 0x11, 0x43, 0x3d, - 0x68, 0x9d, 0x52, 0x97, 0xc4, 0x13, 0x97, 0xfa, 0x91, 0xde, 0x2f, 0xab, 0x42, 0x5d, 0x68, 0x30, - 0x77, 0x1a, 0x4e, 0x7c, 0x72, 0xaa, 0xb6, 0x4e, 0x64, 0x74, 0x17, 0xea, 0x21, 0x0d, 0x3e, 0xc3, - 0xa3, 0x48, 0xf0, 0xd4, 0xda, 0xfd, 0x73, 0x31, 0x11, 0x1a, 0x85, 0x6e, 0x43, 0xf5, 0x84, 0x07, - 0xaa, 0x78, 0x3b, 0x07, 0x2e, 0x31, 0xe8, 0x0e, 0xd4, 0x42, 0x1c, 0x84, 0x13, 0x5e, 0xf6, 0x17, - 0xa0, 0x15, 0x08, 0x1d, 0x02, 0x92, 0x5f, 0x43, 0x9f, 0x44, 0x98, 0xba, 0xa3, 0x88, 0xdf, 0xd6, - 0x9a, 0xf0, 0xab, 0x6b, 0xf7, 0x83, 0x69, 0x48, 0x31, 0x63, 0xd8, 0x93, 0x8b, 0x9d, 0x60, 0xae, - 0xd6, 0xaf, 0xc9, 0x55, 0x87, 0xe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 0x2c, 0x30, - 0x11, 0xe5, 0x20, 0x1c, 0xd4, 0x72, 0xb6, 0x82, 0xca, 0xb9, 0x56, 0xc0, 0x3b, 0xe8, 0x66, 0x5f, - 0xc2, 0x92, 0x03, 0x34, 0x55, 0xff, 0x87, 0x35, 0xa6, 0x75, 0xbc, 0x51, 0xf0, 0x90, 0x14, 0x6d, - 0x77, 0xec, 0x73, 0x16, 0xd9, 0x89, 0x62, 0x7f, 0xc1, 0x03, 0x91, 0x24, 0xae, 0xb2, 0xbc, 0xb6, - 0xfb, 0x02, 0x36, 0x8a, 0x80, 0x97, 0x69, 0x13, 0xe9, 0x89, 0x19, 0x7e, 0xde, 0x01, 0xf4, 0x45, - 0x44, 0xfc, 0x96, 0x16, 0x3e, 0xcc, 0xbb, 0xd0, 0xd0, 0xe5, 0xad, 0x07, 0x99, 0x96, 0xd3, 0x6b, - 0x54, 0x39, 0xe7, 0x1a, 0x59, 0x5f, 0x40, 0x4d, 0xee, 0x9f, 0xfc, 0x08, 0x33, 0x32, 0x3f, 0xc2, - 0xb6, 0xa1, 0x33, 0x1f, 0xe3, 0xec, 0x6f, 0xac, 0x92, 0x28, 0x82, 0x36, 0xd7, 0x26, 0x3f, 0x9f, - 0xae, 0x40, 0xcd, 0x8d, 0xa3, 0x71, 0x40, 0xd5, 0x5d, 0x57, 0x12, 0xba, 0x99, 0x7f, 0xa9, 0xb6, - 0xec, 0x34, 0x12, 0xfd, 0x3a, 0x79, 0xc7, 0x1f, 0x27, 0x22, 0x61, 0xcb, 0xe5, 0x7c, 0x33, 0xdf, - 0xe4, 0x5b, 0xbb, 0x75, 0xb5, 0x3c, 0x6d, 0x12, 0x37, 0xa1, 0x2d, 0x4f, 0xca, 0x55, 0x6f, 0x4b, - 0xea, 0x44, 0x01, 0x5b, 0x33, 0xa8, 0x1c, 0x2d, 0xc2, 0x80, 0x57, 0xd6, 0x9c, 0x06, 0xe4, 0x54, - 0x45, 0x27, 0x05, 0x59, 0x3d, 0x94, 0xf2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 0x97, 0x3b, 0x73, 0x5f, - 0x01, 0x92, 0xf7, 0x97, 0x14, 0xe5, 0xfb, 0x2b, 0x63, 0xfa, 0x54, 0x3a, 0xdb, 0x19, 0x82, 0x8e, - 0x6b, 0xe2, 0x6f, 0x98, 0xfb, 0xbf, 0x07, 0x00, 0x00, 0xff, 0xff, 0x8e, 0x4f, 0xe3, 0x8d, 0x92, - 0x11, 0x00, 0x00, + // 1741 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x58, 0xcd, 0x6f, 0xdb, 0xca, + 0x11, 0x07, 0xf5, 0xad, 0x91, 0x2c, 0xd5, 0x6b, 0x37, 0xe6, 0x63, 0xe0, 0x44, 0x61, 0xfd, 0x5a, + 0xbf, 0xa6, 0x8f, 0xef, 0xc1, 0xe9, 0x03, 0x92, 0xf4, 0x52, 0x5b, 0x6e, 0x10, 0x03, 0xf9, 0xa4, + 0x9c, 0x14, 0xbd, 0x44, 0xa0, 0xc5, 0xb5, 0xc5, 0x46, 0x5a, 0x12, 0xbb, 0xa4, 0x64, 0x05, 0x2d, + 0xd0, 0x53, 0x4f, 0xbd, 0xf6, 0xda, 0x5b, 0x2f, 0x2d, 0x7a, 0xea, 0xbf, 0x50, 0x14, 0x28, 0x7a, + 0xeb, 0x1f, 0xd1, 0xbf, 0xa3, 0xd8, 0x2f, 0x7e, 0xc8, 0xb4, 0xe3, 0xde, 0x38, 0x33, 0xbf, 0xdd, + 0x9d, 0xf9, 0xcd, 0xec, 0xcc, 0x4a, 0xd0, 0x8a, 0xce, 0x9c, 0x88, 0x86, 0x71, 0x68, 0xff, 0xb7, + 0x02, 0xad, 0x97, 0x38, 0xf6, 0x7c, 0x2f, 0xf6, 0x90, 0x09, 0xcd, 0x05, 0xa6, 0x2c, 0x08, 0x89, + 0x69, 0x0c, 0x8c, 0xfd, 0xba, 0xab, 0x45, 0x84, 0xa0, 0x36, 0xf5, 0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, 0xd7, + 0x2f, 0x8b, 0x95, 0xdf, 0x5f, 0x8b, 0x2d, 0xef, 0xd7, 0x5f, 0x0d, 0xd8, 0xca, 0xac, 0xe9, 0xe8, + 0x45, 0x87, 0xf9, 0xee, 0x2f, 0x9d, 0xfb, 0x81, 0x53, 0x02, 0xbc, 0x61, 0x12, 0xbc, 0xbd, 0xc5, + 0x24, 0xf8, 0xaa, 0xe8, 0xe9, 0x56, 0x49, 0xfc, 0x79, 0x6f, 0xff, 0x60, 0x80, 0x55, 0xe2, 0x84, + 0x2e, 0x69, 0x07, 0x9a, 0x81, 0xb4, 0x2a, 0x97, 0xb7, 0xcb, 0x5c, 0x76, 0x35, 0xe8, 0x16, 0xf5, + 0x5d, 0x6c, 0xd0, 0xd5, 0xb5, 0xdf, 0x4a, 0x7f, 0x33, 0xa0, 0x7f, 0xf5, 0x5a, 0x35, 0xa6, 0xd8, + 0xf3, 0x31, 0x15, 0x61, 0xf2, 0xae, 0xac, 0xff, 0xaa, 0x70, 0x95, 0x01, 0x3d, 0xe5, 0xfd, 0x96, + 0xc4, 0x69, 0xbf, 0xe5, 0x79, 0x5f, 0x9f, 0x23, 0x43, 0x05, 0x48, 0x5f, 0x8b, 0x52, 0x94, 0xaf, + 0xc5, 0x9c, 0xe9, 0x73, 0x7f, 0x62, 0x74, 0x73, 0xf4, 0x9d, 0x35, 0xc4, 0x9f, 0x46, 0x8f, 0xfe, + 0x17, 0x00, 0x00, 0xff, 0xff, 0x01, 0xe4, 0xea, 0x45, 0x40, 0x12, 0x00, 0x00, } diff --git a/internal/pb/pb.proto b/internal/pb/pb.proto index e3bd1dcc..8cc76e17 100644 --- a/internal/pb/pb.proto +++ b/internal/pb/pb.proto @@ -182,8 +182,12 @@ message TyposDataset { repeated Typo typos = 1; } +message ImportsPerTick { + map counts = 1; +} + message ImportsPerLanguage { - map counts = 1; + map ticks = 1; } message ImportsPerDeveloper { @@ -193,6 +197,8 @@ message ImportsPerDeveloper { message ImportsPerDeveloperResults { repeated ImportsPerDeveloper imports = 1; repeated string author_index = 2; + // how long each tick is, as an int64 nanosecond count (Go's time.Duration) + int64 tick_size = 3; } message AnalysisResults { diff --git a/leaves/burndown.go b/leaves/burndown.go index 8696e244..d8c66f15 100644 --- a/leaves/burndown.go +++ b/leaves/burndown.go @@ -47,6 +47,9 @@ type BurndownAnalysis struct { // PeopleNumber is the number of developers for which to collect the burndown stats. 0 disables it. PeopleNumber int + // TickSize indicates the size of each time granule: day, hour, week, etc. + TickSize time.Duration + // HibernationThreshold sets the hibernation threshold for the underlying // RBTree allocator. It is useful to trade CPU time for reduced peak memory consumption // if there are many branches. @@ -103,8 +106,6 @@ type BurndownAnalysis struct { // previousTick is the tick from the previous sample period - // different from TicksSinceStart.previousTick. previousTick int - // tickSize indicates the size of each tick. - tickSize time.Duration // references IdentityDetector.ReversedPeopleDict reversedPeopleDict []string @@ -140,7 +141,7 @@ type BurndownResult struct { // Pipeline.Initialize(facts map[string]interface{}). Thus it can be obtained via // facts[FactIdentityDetectorReversedPeopleDict]. reversedPeopleDict []string - // tickSize references TicksSinceStart.tickSize + // TickSize references TicksSinceStart.TickSize tickSize time.Duration // sampling and granularity are copied from BurndownAnalysis and stored for service purposes // such as merging several results together. @@ -294,7 +295,7 @@ func (analyser *BurndownAnalysis) Configure(facts map[string]interface{}) error analyser.Debug = val } if val, exists := facts[items.FactTickSize].(time.Duration); exists { - analyser.tickSize = val + analyser.TickSize = val } return nil } @@ -329,10 +330,10 @@ func (analyser *BurndownAnalysis) Initialize(repository *git.Repository) error { analyser.Granularity) analyser.Sampling = analyser.Granularity } - if analyser.tickSize == 0 { + if analyser.TickSize == 0 { def := items.DefaultTicksSinceStartTickSize * time.Hour analyser.l.Warnf("tick size was not set, adjusted to %v\n", def) - analyser.tickSize = items.DefaultTicksSinceStartTickSize * time.Hour + analyser.TickSize = items.DefaultTicksSinceStartTickSize * time.Hour } analyser.repository = repository analyser.globalHistory = sparseHistory{} @@ -570,7 +571,7 @@ func (analyser *BurndownAnalysis) Finalize() interface{} { FileOwnership: fileOwnership, PeopleHistories: peopleHistories, PeopleMatrix: peopleMatrix, - tickSize: analyser.tickSize, + tickSize: analyser.TickSize, reversedPeopleDict: analyser.reversedPeopleDict, sampling: analyser.Sampling, granularity: analyser.Granularity, @@ -653,12 +654,12 @@ func (analyser *BurndownAnalysis) MergeResults( bar1.tickSize, bar2.tickSize) } // for backwards-compatibility, if no tick size is present set to default - analyser.tickSize = bar1.tickSize - if analyser.tickSize == 0 { - analyser.tickSize = items.DefaultTicksSinceStartTickSize * time.Hour + analyser.TickSize = bar1.tickSize + if analyser.TickSize == 0 { + analyser.TickSize = items.DefaultTicksSinceStartTickSize * time.Hour } merged := BurndownResult{ - tickSize: analyser.tickSize, + tickSize: analyser.TickSize, } if bar1.sampling < bar2.sampling { merged.sampling = bar1.sampling diff --git a/leaves/burndown_test.go b/leaves/burndown_test.go index f85371fb..4d073747 100644 --- a/leaves/burndown_test.go +++ b/leaves/burndown_test.go @@ -87,7 +87,7 @@ func TestBurndownConfigure(t *testing.T) { assert.True(t, bd.HibernationToDisk) assert.Equal(t, bd.HibernationDirectory, "xxx") assert.Equal(t, bd.Debug, true) - assert.Equal(t, bd.tickSize, 24*time.Hour) + assert.Equal(t, bd.TickSize, 24*time.Hour) assert.Equal(t, bd.reversedPeopleDict, bd.Requires()) facts[ConfigBurndownTrackPeople] = false facts[identity.FactIdentityDetectorPeopleCount] = 50 @@ -480,7 +480,7 @@ func bakeBurndownForSerialization(t *testing.T, firstAuthor, secondAuthor int) ( Sampling: 30, PeopleNumber: 2, TrackFiles: true, - tickSize: 24 * time.Hour, + TickSize: 24 * time.Hour, } assert.Nil(t, bd.Initialize(test.Repository)) deps := map[string]interface{}{} @@ -1153,7 +1153,7 @@ func TestBurndownMergeGlobalHistory(t *testing.T) { res2.PeopleMatrix[1][2] = 700 res2.PeopleMatrix[1][3] = 800 bd := BurndownAnalysis{ - tickSize: 24 * time.Hour, + TickSize: 24 * time.Hour, } merged := bd.MergeResults(res1, res2, &c1, &c2).(BurndownResult) assert.Equal(t, merged.granularity, 19) @@ -1212,7 +1212,7 @@ func TestBurndownMergeGlobalHistory_withDifferentTickSizes(t *testing.T) { RunTime: 100000, } bd := BurndownAnalysis{ - tickSize: 24 * time.Hour, + TickSize: 24 * time.Hour, } merged := bd.MergeResults(res1, res2, &c1, &c2) assert.IsType(t, errors.New(""), merged) @@ -1253,7 +1253,7 @@ func TestBurndownMergeNils(t *testing.T) { RunTime: 100000, } bd := BurndownAnalysis{ - tickSize: 24 * time.Hour, + TickSize: 24 * time.Hour, } merged := bd.MergeResults(res1, res2, &c1, &c2).(BurndownResult) assert.Equal(t, merged.granularity, 19) @@ -1499,14 +1499,14 @@ func TestBurndownMergeMatrices(t *testing.T) { CommitsNumber: 6982, RunTime: 1567214, } - bd := BurndownAnalysis{tickSize: 24 * time.Hour} - nh := bd.mergeMatrices(h, nil, 30, 30, 30, 30, bd.tickSize, cr, cr) + bd := BurndownAnalysis{TickSize: 24 * time.Hour} + nh := bd.mergeMatrices(h, nil, 30, 30, 30, 30, bd.TickSize, cr, cr) for y, row := range nh { for x, v := range row { assert.InDelta(t, v, h[y][x], 1, fmt.Sprintf("y=%d x=%d", y, x)) } } - nh = bd.mergeMatrices(h, h, 30, 30, 30, 30, bd.tickSize, cr, cr) + nh = bd.mergeMatrices(h, h, 30, 30, 30, 30, bd.TickSize, cr, cr) for y, row := range nh { for x, v := range row { assert.InDelta(t, v, h[y][x]*2, 1, fmt.Sprintf("y=%d x=%d", y, x)) @@ -1559,7 +1559,7 @@ func TestBurndownMergePeopleHistories(t *testing.T) { RunTime: 100000, } bd := BurndownAnalysis{ - tickSize: 24 * time.Hour, + TickSize: 24 * time.Hour, } merged := bd.MergeResults(res1, res2, &c1, &c2).(BurndownResult) mh := [][]int64{ diff --git a/leaves/devs.go b/leaves/devs.go index c1d271a6..b73f21bb 100644 --- a/leaves/devs.go +++ b/leaves/devs.go @@ -33,7 +33,7 @@ type DevsAnalysis struct { ticks map[int]map[int]*DevTick // reversedPeopleDict references IdentityDetector.ReversedPeopleDict reversedPeopleDict []string - // tickSize references TicksSinceStart.tickSize + // TickSize references TicksSinceStart.TickSize tickSize time.Duration l core.Logger @@ -47,7 +47,7 @@ type DevsResult struct { // reversedPeopleDict references IdentityDetector.ReversedPeopleDict reversedPeopleDict []string - // tickSize references TicksSinceStart.tickSize + // TickSize references TicksSinceStart.TickSize tickSize time.Duration } diff --git a/leaves/imports_printer.go b/leaves/imports_printer.go index 18101238..72c397cf 100644 --- a/leaves/imports_printer.go +++ b/leaves/imports_printer.go @@ -6,36 +6,46 @@ import ( "io" "log" "sort" + "time" "github.com/gogo/protobuf/proto" imports2 "github.com/src-d/imports" "gopkg.in/src-d/go-git.v4" - "gopkg.in/src-d/go-git.v4/plumbing" + gitplumbing "gopkg.in/src-d/go-git.v4/plumbing" "gopkg.in/src-d/hercules.v10/internal/core" "gopkg.in/src-d/hercules.v10/internal/pb" + "gopkg.in/src-d/hercules.v10/internal/plumbing" "gopkg.in/src-d/hercules.v10/internal/plumbing/identity" "gopkg.in/src-d/hercules.v10/internal/plumbing/imports" "gopkg.in/src-d/hercules.v10/internal/yaml" ) +// ImportsMap is the type of the mapping from dev indexes to languages to import names to ticks to +// usage counts. Ticks start counting from 0 and correspond to the earliest commit timestamp +// (included in the YAML/protobuf header). +type ImportsMap = map[int]map[string]map[string]map[int]int64 + // ImportsPerDeveloper collects imports per developer. type ImportsPerDeveloper struct { core.NoopMerger core.OneShotMergeProcessor - // imports is the mapping from dev indexes to languages to import names to usage counts. - imports map[int]map[string]map[string]int + // TickSize defines the time mapping granularity (the last ImportsMap's key). + TickSize time.Duration + // imports mapping, see the referenced type for details. + imports ImportsMap // reversedPeopleDict references IdentityDetector.ReversedPeopleDict reversedPeopleDict []string - - l core.Logger + l core.Logger } // ImportsPerDeveloperResult is returned by Finalize() and represents the analysis result. type ImportsPerDeveloperResult struct { - // Imports is the mapping from dev indexes to languages to import names to usage counts. - Imports map[int]map[string]map[string]int + // Imports is the imports mapping, see the referenced type for details. + Imports ImportsMap // reversedPeopleDict references IdentityDetector.ReversedPeopleDict reversedPeopleDict []string + // tickSize references TicksSinceStart.TickSize + tickSize time.Duration } // Name of this PipelineItem. Uniquely identifies the type, used for mapping keys, etc. @@ -54,7 +64,7 @@ func (ipd *ImportsPerDeveloper) Provides() []string { // Each requested entity will be inserted into `deps` of Consume(). In turn, those // entities are Provides() upstream. func (ipd *ImportsPerDeveloper) Requires() []string { - return []string{imports.DependencyImports, identity.DependencyAuthor} + return []string{imports.DependencyImports, identity.DependencyAuthor, plumbing.DependencyTick} } // ListConfigurationOptions returns the list of changeable public properties of this PipelineItem. @@ -79,6 +89,9 @@ func (ipd *ImportsPerDeveloper) Configure(facts map[string]interface{}) error { ipd.l = l } ipd.reversedPeopleDict = facts[identity.FactIdentityDetectorReversedPeopleDict].([]string) + if val, exists := facts[plumbing.FactTickSize].(time.Duration); exists { + ipd.TickSize = val + } return nil } @@ -86,8 +99,12 @@ func (ipd *ImportsPerDeveloper) Configure(facts map[string]interface{}) error { // calls. The repository which is going to be analysed is supplied as an argument. func (ipd *ImportsPerDeveloper) Initialize(repository *git.Repository) error { ipd.l = core.NewLogger() - ipd.imports = map[int]map[string]map[string]int{} + ipd.imports = ImportsMap{} ipd.OneShotMergeProcessor.Initialize() + if ipd.TickSize == 0 { + ipd.TickSize = time.Hour * 24 + ipd.l.Warnf("tick size was not set, adjusted to %v\n", ipd.TickSize) + } return nil } @@ -103,20 +120,26 @@ func (ipd *ImportsPerDeveloper) Consume(deps map[string]interface{}) (map[string return nil, nil } author := deps[identity.DependencyAuthor].(int) - imps := deps[imports.DependencyImports].(map[plumbing.Hash]imports2.File) + imps := deps[imports.DependencyImports].(map[gitplumbing.Hash]imports2.File) aimps := ipd.imports[author] + tick := deps[plumbing.DependencyTick].(int) if aimps == nil { - aimps = map[string]map[string]int{} + aimps = map[string]map[string]map[int]int64{} ipd.imports[author] = aimps } for _, file := range imps { limps := aimps[file.Lang] if limps == nil { - limps = map[string]int{} + limps = map[string]map[int]int64{} aimps[file.Lang] = limps } for _, imp := range file.Imports { - limps[imp]++ + timps, exists := limps[imp] + if !exists { + timps = map[int]int64{} + limps[imp] = timps + } + timps[tick]++ } } return nil, nil @@ -124,7 +147,11 @@ func (ipd *ImportsPerDeveloper) Consume(deps map[string]interface{}) (map[string // Finalize returns the result of the analysis. Further Consume() calls are not expected. func (ipd *ImportsPerDeveloper) Finalize() interface{} { - return ImportsPerDeveloperResult{Imports: ipd.imports, reversedPeopleDict: ipd.reversedPeopleDict} + return ImportsPerDeveloperResult{ + Imports: ipd.imports, + reversedPeopleDict: ipd.reversedPeopleDict, + tickSize: ipd.TickSize, + } } // Fork clones this PipelineItem. @@ -149,13 +176,15 @@ func (ipd *ImportsPerDeveloper) serializeText(result *ImportsPerDeveloperResult, devs = append(devs, dev) } sort.Ints(devs) + fmt.Fprintln(writer, " tick_size:", int(result.tickSize.Seconds())) + fmt.Fprintln(writer, " imports:") for _, dev := range devs { imps := result.Imports[dev] obj, err := json.Marshal(imps) if err != nil { log.Panicf("Could not serialize %v: %v", imps, err) } - fmt.Fprintf(writer, " - %s: %s\n", yaml.SafeString(result.reversedPeopleDict[dev]), string(obj)) + fmt.Fprintf(writer, " %s: %s\n", yaml.SafeString(result.reversedPeopleDict[dev]), string(obj)) } } @@ -163,15 +192,20 @@ func (ipd *ImportsPerDeveloper) serializeBinary(result *ImportsPerDeveloperResul message := pb.ImportsPerDeveloperResults{ Imports: make([]*pb.ImportsPerDeveloper, len(result.Imports)), AuthorIndex: result.reversedPeopleDict, + TickSize: int64(result.tickSize), } - for key, vals := range result.Imports { - dev := &pb.ImportsPerDeveloper{Languages: map[string]*pb.ImportsPerLanguage{}} - message.Imports[key] = dev - for lang, counts := range vals { - counts64 := map[string]int64{} - dev.Languages[lang] = &pb.ImportsPerLanguage{Counts: counts64} - for imp, n := range counts { - counts64[imp] = int64(n) + for key, dev := range result.Imports { + pbdev := &pb.ImportsPerDeveloper{Languages: map[string]*pb.ImportsPerLanguage{}} + message.Imports[key] = pbdev + for lang, ticks := range dev { + pbticks := map[string]*pb.ImportsPerTick{} + pbdev.Languages[lang] = &pb.ImportsPerLanguage{Ticks: pbticks} + for imp, tick := range ticks { + counts := map[int32]int64{} + pbticks[imp] = &pb.ImportsPerTick{Counts: counts} + for ti, val := range tick { + counts[int32(ti)] = val + } } } } @@ -183,6 +217,36 @@ func (ipd *ImportsPerDeveloper) serializeBinary(result *ImportsPerDeveloperResul return err } +// Deserialize converts the specified protobuf bytes to ImportsPerDeveloperResult. +func (ipd *ImportsPerDeveloper) Deserialize(pbmessage []byte) (interface{}, error) { + msg := pb.ImportsPerDeveloperResults{} + err := proto.Unmarshal(pbmessage, &msg) + if err != nil { + return nil, err + } + r := ImportsPerDeveloperResult{ + Imports: ImportsMap{}, + reversedPeopleDict: msg.AuthorIndex, + tickSize: time.Duration(msg.TickSize), + } + for devi, dev := range msg.Imports { + rdev := map[string]map[string]map[int]int64{} + r.Imports[devi] = rdev + for lang, names := range dev.Languages { + rlang := map[string]map[int]int64{} + rdev[lang] = rlang + for name, ticks := range names.Ticks { + rticks := map[int]int64{} + rlang[name] = rticks + for tick, val := range ticks.Counts { + rticks[int(tick)] = val + } + } + } + } + return r, nil +} + func init() { core.Registry.Register(&ImportsPerDeveloper{}) } diff --git a/leaves/imports_printer_test.go b/leaves/imports_printer_test.go index f5bcdc20..1ae359b5 100644 --- a/leaves/imports_printer_test.go +++ b/leaves/imports_printer_test.go @@ -2,15 +2,14 @@ package leaves import ( "bytes" - "fmt" "testing" + "time" - "github.com/gogo/protobuf/proto" imports2 "github.com/src-d/imports" "github.com/stretchr/testify/assert" gitplumbing "gopkg.in/src-d/go-git.v4/plumbing" "gopkg.in/src-d/hercules.v10/internal/core" - "gopkg.in/src-d/hercules.v10/internal/pb" + "gopkg.in/src-d/hercules.v10/internal/plumbing" "gopkg.in/src-d/hercules.v10/internal/plumbing/identity" "gopkg.in/src-d/hercules.v10/internal/plumbing/imports" "gopkg.in/src-d/hercules.v10/internal/test" @@ -26,21 +25,25 @@ func fixtureImportsPerDev() *ImportsPerDeveloper { func TestImportsPerDeveloperMeta(t *testing.T) { ipd := fixtureImportsPerDev() - assert.Equal(t, ipd.Name(), "ImportsPerDeveloper") - assert.Equal(t, len(ipd.Provides()), 0) - assert.Equal(t, len(ipd.Requires()), 2) - assert.Equal(t, ipd.Requires()[0], imports.DependencyImports) - assert.Equal(t, ipd.Requires()[1], identity.DependencyAuthor) - assert.Equal(t, ipd.Flag(), "imports-per-dev") + ass := assert.New(t) + ass.Equal(ipd.Name(), "ImportsPerDeveloper") + ass.Equal(len(ipd.Provides()), 0) + ass.Equal(len(ipd.Requires()), 3) + ass.Equal(ipd.Requires()[0], imports.DependencyImports) + ass.Equal(ipd.Requires()[1], identity.DependencyAuthor) + ass.Equal(ipd.Requires()[2], plumbing.DependencyTick) + ass.Equal(ipd.Flag(), "imports-per-dev") assert.Len(t, ipd.ListConfigurationOptions(), 0) assert.True(t, len(ipd.Description()) > 0) logger := core.NewLogger() assert.NoError(t, ipd.Configure(map[string]interface{}{ core.ConfigLogger: logger, identity.FactIdentityDetectorReversedPeopleDict: []string{"1", "2"}, + plumbing.FactTickSize: time.Hour, })) - assert.Equal(t, logger, ipd.l) - assert.Equal(t, []string{"1", "2"}, ipd.reversedPeopleDict) + ass.Equal(logger, ipd.l) + ass.Equal([]string{"1", "2"}, ipd.reversedPeopleDict) + ass.Equal(time.Hour, ipd.TickSize) } func TestImportsPerDeveloperRegistration(t *testing.T) { @@ -61,12 +64,14 @@ func TestImportsPerDeveloperRegistration(t *testing.T) { func TestImportsPerDeveloperInitialize(t *testing.T) { ipd := fixtureImportsPerDev() assert.NotNil(t, ipd.imports) + assert.Equal(t, time.Hour*24, ipd.TickSize) } func TestImportsPerDeveloperConsumeFinalize(t *testing.T) { deps := map[string]interface{}{} deps[core.DependencyIsMerge] = false deps[identity.DependencyAuthor] = 0 + deps[plumbing.DependencyTick] = 1 imps := map[gitplumbing.Hash]imports2.File{} imps[gitplumbing.NewHash("291286b4ac41952cbd1389fda66420ec03c1a9fe")] = imports2.File{Lang: "Go", Path: "test.go", Imports: []string{"sys"}} @@ -77,27 +82,27 @@ func TestImportsPerDeveloperConsumeFinalize(t *testing.T) { ipd.reversedPeopleDict = []string{"1", "2"} _, err := ipd.Consume(deps) assert.NoError(t, err) - assert.Equal(t, map[int]map[string]map[string]int{ - 0: {"Go": {"sys": 1}, "Python": {"sys": 1}}, + assert.Equal(t, ImportsMap{ + 0: {"Go": {"sys": {1: 1}}, "Python": {"sys": {1: 1}}}, }, ipd.imports) _, err = ipd.Consume(deps) assert.NoError(t, err) - assert.Equal(t, map[int]map[string]map[string]int{ - 0: {"Go": {"sys": 2}, "Python": {"sys": 2}}, + assert.Equal(t, ImportsMap{ + 0: {"Go": {"sys": {1: 2}}, "Python": {"sys": {1: 2}}}, }, ipd.imports) deps[identity.DependencyAuthor] = 1 _, err = ipd.Consume(deps) assert.NoError(t, err) - assert.Equal(t, map[int]map[string]map[string]int{ - 0: {"Go": {"sys": 2}, "Python": {"sys": 2}}, - 1: {"Go": {"sys": 1}, "Python": {"sys": 1}}, + assert.Equal(t, ImportsMap{ + 0: {"Go": {"sys": {1: 2}}, "Python": {"sys": {1: 2}}}, + 1: {"Go": {"sys": {1: 1}}, "Python": {"sys": {1: 1}}}, }, ipd.imports) deps[core.DependencyIsMerge] = true _, err = ipd.Consume(deps) assert.NoError(t, err) - assert.Equal(t, map[int]map[string]map[string]int{ - 0: {"Go": {"sys": 2}, "Python": {"sys": 2}}, - 1: {"Go": {"sys": 1}, "Python": {"sys": 1}}, + assert.Equal(t, ImportsMap{ + 0: {"Go": {"sys": {1: 2}}, "Python": {"sys": {1: 2}}}, + 1: {"Go": {"sys": {1: 1}}, "Python": {"sys": {1: 1}}}, }, ipd.imports) result := ipd.Finalize().(ImportsPerDeveloperResult) assert.Equal(t, ipd.reversedPeopleDict, result.reversedPeopleDict) @@ -106,26 +111,29 @@ func TestImportsPerDeveloperConsumeFinalize(t *testing.T) { func TestImportsPerDeveloperSerializeText(t *testing.T) { ipd := fixtureImportsPerDev() - res := ImportsPerDeveloperResult{Imports: map[int]map[string]map[string]int{ - 0: {"Go": {"sys": 2}, "Python": {"sys": 2}}, - 1: {"Go": {"sys": 1}, "Python": {"sys": 1}}, + res := ImportsPerDeveloperResult{Imports: ImportsMap{ + 0: {"Go": {"sys": {1: 2}}, "Python": {"sys": {1: 2}}}, + 1: {"Go": {"sys": {1: 1}}, "Python": {"sys": {1: 1}}}, }, reversedPeopleDict: []string{"one", "two"}} buffer := &bytes.Buffer{} assert.NoError(t, ipd.Serialize(res, false, buffer)) - assert.Equal(t, ` - "one": {"Go":{"sys":2},"Python":{"sys":2}} - - "two": {"Go":{"sys":1},"Python":{"sys":1}} + assert.Equal(t, ` tick_size: 0 + imports: + "one": {"Go":{"sys":{"1":2}},"Python":{"sys":{"1":2}}} + "two": {"Go":{"sys":{"1":1}},"Python":{"sys":{"1":1}}} `, buffer.String()) } func TestImportsPerDeveloperSerializeBinary(t *testing.T) { ipd := fixtureImportsPerDev() - res := ImportsPerDeveloperResult{Imports: map[int]map[string]map[string]int{ - 0: {"Go": {"sys": 2}, "Python": {"sys": 2}}, - 1: {"Go": {"sys": 1}, "Python": {"sys": 1}}, + ass := assert.New(t) + res := ImportsPerDeveloperResult{Imports: ImportsMap{ + 0: {"Go": {"sys": {1: 2}}, "Python": {"sys": {1: 2}}}, + 1: {"Go": {"sys": {1: 1}}, "Python": {"sys": {1: 1}}}, }, reversedPeopleDict: []string{"one", "two"}} buffer := &bytes.Buffer{} - assert.NoError(t, ipd.Serialize(res, true, buffer)) - msg := pb.ImportsPerDeveloperResults{} - assert.Nil(t, proto.Unmarshal(buffer.Bytes(), &msg)) - assert.Equal(t, `{[languages: > > languages: > > languages: > > languages: > > ] [one two] {} [] 0}`, fmt.Sprint(msg)) + ass.NoError(ipd.Serialize(res, true, buffer)) + back, err := ipd.Deserialize(buffer.Bytes()) + ass.NoError(err) + ass.Equal(res, back) } diff --git a/python/labours/pb_pb2.py b/python/labours/pb_pb2.py index 93ff9816..8501470a 100644 --- a/python/labours/pb_pb2.py +++ b/python/labours/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\"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\"\xaa\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\x12\x11\n\ttick_size\x18\x08 \x01(\x03\"}\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\"\xa9\x01\n\x0b\x46ileHistory\x12\x0f\n\x07\x63ommits\x18\x01 \x03(\t\x12\x42\n\x14\x63hanges_by_developer\x18\x02 \x03(\x0b\x32$.FileHistory.ChangesByDeveloperEntry\x1a\x45\n\x17\x43hangesByDeveloperEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.LineStats:\x02\x38\x01\"\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\"\x9f\x01\n\x07\x44\x65vTick\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\x17.DevTick.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\"d\n\x08TickDevs\x12!\n\x04\x64\x65vs\x18\x01 \x03(\x0b\x32\x13.TickDevs.DevsEntry\x1a\x35\n\tDevsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x17\n\x05value\x18\x02 \x01(\x0b\x32\x08.DevTick:\x02\x38\x01\"\xa4\x01\n\x13\x44\x65vsAnalysisResults\x12.\n\x05ticks\x18\x01 \x03(\x0b\x32\x1f.DevsAnalysisResults.TicksEntry\x12\x11\n\tdev_index\x18\x02 \x03(\t\x12\x11\n\ttick_size\x18\x08 \x01(\x03\x1a\x37\n\nTicksEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x18\n\x05value\x18\x02 \x01(\x0b\x32\t.TickDevs:\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\"\xa7\x01\n\x17\x43ommentSentimentResults\x12H\n\x11sentiment_by_tick\x18\x01 \x03(\x0b\x32-.CommentSentimentResults.SentimentByTickEntry\x1a\x42\n\x14SentimentByTickEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.Sentiment:\x02\x38\x01\"G\n\nCommitFile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08language\x18\x03 \x01(\t\x12\x19\n\x05stats\x18\x04 \x01(\x0b\x32\n.LineStats\"Z\n\x06\x43ommit\x12\x0c\n\x04hash\x18\x01 \x01(\t\x12\x16\n\x0ewhen_unix_time\x18\x02 \x01(\x03\x12\x0e\n\x06\x61uthor\x18\x03 \x01(\x05\x12\x1a\n\x05\x66iles\x18\x04 \x03(\x0b\x32\x0b.CommitFile\"H\n\x16\x43ommitsAnalysisResults\x12\x18\n\x07\x63ommits\x18\x01 \x03(\x0b\x32\x07.Commit\x12\x14\n\x0c\x61uthor_index\x18\x02 \x03(\t\"R\n\x04Typo\x12\r\n\x05wrong\x18\x01 \x01(\t\x12\x0f\n\x07\x63orrect\x18\x02 \x01(\t\x12\x0e\n\x06\x63ommit\x18\x03 \x01(\t\x12\x0c\n\x04\x66ile\x18\x04 \x01(\t\x12\x0c\n\x04line\x18\x05 \x01(\x05\"$\n\x0cTyposDataset\x12\x14\n\x05typos\x18\x01 \x03(\x0b\x32\x05.Typo\"t\n\x12ImportsPerLanguage\x12/\n\x06\x63ounts\x18\x01 \x03(\x0b\x32\x1f.ImportsPerLanguage.CountsEntry\x1a-\n\x0b\x43ountsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\"\x94\x01\n\x13ImportsPerDeveloper\x12\x36\n\tlanguages\x18\x01 \x03(\x0b\x32#.ImportsPerDeveloper.LanguagesEntry\x1a\x45\n\x0eLanguagesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.ImportsPerLanguage:\x02\x38\x01\"Y\n\x1aImportsPerDeveloperResults\x12%\n\x07imports\x18\x01 \x03(\x0b\x32\x14.ImportsPerDeveloper\x12\x14\n\x0c\x61uthor_index\x18\x02 \x03(\t\"\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\"\xaa\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\x12\x11\n\ttick_size\x18\x08 \x01(\x03\"}\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\"\xa9\x01\n\x0b\x46ileHistory\x12\x0f\n\x07\x63ommits\x18\x01 \x03(\t\x12\x42\n\x14\x63hanges_by_developer\x18\x02 \x03(\x0b\x32$.FileHistory.ChangesByDeveloperEntry\x1a\x45\n\x17\x43hangesByDeveloperEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.LineStats:\x02\x38\x01\"\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\"\x9f\x01\n\x07\x44\x65vTick\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\x17.DevTick.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\"d\n\x08TickDevs\x12!\n\x04\x64\x65vs\x18\x01 \x03(\x0b\x32\x13.TickDevs.DevsEntry\x1a\x35\n\tDevsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x17\n\x05value\x18\x02 \x01(\x0b\x32\x08.DevTick:\x02\x38\x01\"\xa4\x01\n\x13\x44\x65vsAnalysisResults\x12.\n\x05ticks\x18\x01 \x03(\x0b\x32\x1f.DevsAnalysisResults.TicksEntry\x12\x11\n\tdev_index\x18\x02 \x03(\t\x12\x11\n\ttick_size\x18\x08 \x01(\x03\x1a\x37\n\nTicksEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x18\n\x05value\x18\x02 \x01(\x0b\x32\t.TickDevs:\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\"\xa7\x01\n\x17\x43ommentSentimentResults\x12H\n\x11sentiment_by_tick\x18\x01 \x03(\x0b\x32-.CommentSentimentResults.SentimentByTickEntry\x1a\x42\n\x14SentimentByTickEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x19\n\x05value\x18\x02 \x01(\x0b\x32\n.Sentiment:\x02\x38\x01\"G\n\nCommitFile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08language\x18\x03 \x01(\t\x12\x19\n\x05stats\x18\x04 \x01(\x0b\x32\n.LineStats\"Z\n\x06\x43ommit\x12\x0c\n\x04hash\x18\x01 \x01(\t\x12\x16\n\x0ewhen_unix_time\x18\x02 \x01(\x03\x12\x0e\n\x06\x61uthor\x18\x03 \x01(\x05\x12\x1a\n\x05\x66iles\x18\x04 \x03(\x0b\x32\x0b.CommitFile\"H\n\x16\x43ommitsAnalysisResults\x12\x18\n\x07\x63ommits\x18\x01 \x03(\x0b\x32\x07.Commit\x12\x14\n\x0c\x61uthor_index\x18\x02 \x03(\t\"R\n\x04Typo\x12\r\n\x05wrong\x18\x01 \x01(\t\x12\x0f\n\x07\x63orrect\x18\x02 \x01(\t\x12\x0e\n\x06\x63ommit\x18\x03 \x01(\t\x12\x0c\n\x04\x66ile\x18\x04 \x01(\t\x12\x0c\n\x04line\x18\x05 \x01(\x05\"$\n\x0cTyposDataset\x12\x14\n\x05typos\x18\x01 \x03(\x0b\x32\x05.Typo\"l\n\x0eImportsPerTick\x12+\n\x06\x63ounts\x18\x01 \x03(\x0b\x32\x1b.ImportsPerTick.CountsEntry\x1a-\n\x0b\x43ountsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\"\x82\x01\n\x12ImportsPerLanguage\x12-\n\x05ticks\x18\x01 \x03(\x0b\x32\x1e.ImportsPerLanguage.TicksEntry\x1a=\n\nTicksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.ImportsPerTick:\x02\x38\x01\"\x94\x01\n\x13ImportsPerDeveloper\x12\x36\n\tlanguages\x18\x01 \x03(\x0b\x32#.ImportsPerDeveloper.LanguagesEntry\x1a\x45\n\x0eLanguagesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.ImportsPerLanguage:\x02\x38\x01\"l\n\x1aImportsPerDeveloperResults\x12%\n\x07imports\x18\x01 \x03(\x0b\x32\x14.ImportsPerDeveloper\x12\x14\n\x0c\x61uthor_index\x18\x02 \x03(\t\x12\x11\n\ttick_size\x18\x03 \x01(\x03\"\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') ) @@ -1521,22 +1521,22 @@ ) -_IMPORTSPERLANGUAGE_COUNTSENTRY = _descriptor.Descriptor( +_IMPORTSPERTICK_COUNTSENTRY = _descriptor.Descriptor( name='CountsEntry', - full_name='ImportsPerLanguage.CountsEntry', + full_name='ImportsPerTick.CountsEntry', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='key', full_name='ImportsPerLanguage.CountsEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), + name='key', full_name='ImportsPerTick.CountsEntry.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='ImportsPerLanguage.CountsEntry.value', index=1, + name='value', full_name='ImportsPerTick.CountsEntry.value', index=1, number=2, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, @@ -1554,8 +1554,76 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3094, - serialized_end=3139, + serialized_start=3086, + serialized_end=3131, +) + +_IMPORTSPERTICK = _descriptor.Descriptor( + name='ImportsPerTick', + full_name='ImportsPerTick', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='counts', full_name='ImportsPerTick.counts', 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=[_IMPORTSPERTICK_COUNTSENTRY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3023, + serialized_end=3131, +) + + +_IMPORTSPERLANGUAGE_TICKSENTRY = _descriptor.Descriptor( + name='TicksEntry', + full_name='ImportsPerLanguage.TicksEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='ImportsPerLanguage.TicksEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + 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='ImportsPerLanguage.TicksEntry.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + 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=3203, + serialized_end=3264, ) _IMPORTSPERLANGUAGE = _descriptor.Descriptor( @@ -1566,7 +1634,7 @@ containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='counts', full_name='ImportsPerLanguage.counts', index=0, + name='ticks', full_name='ImportsPerLanguage.ticks', 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, @@ -1575,7 +1643,7 @@ ], extensions=[ ], - nested_types=[_IMPORTSPERLANGUAGE_COUNTSENTRY, ], + nested_types=[_IMPORTSPERLANGUAGE_TICKSENTRY, ], enum_types=[ ], serialized_options=None, @@ -1584,8 +1652,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3023, - serialized_end=3139, + serialized_start=3134, + serialized_end=3264, ) @@ -1622,8 +1690,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3221, - serialized_end=3290, + serialized_start=3346, + serialized_end=3415, ) _IMPORTSPERDEVELOPER = _descriptor.Descriptor( @@ -1652,8 +1720,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3142, - serialized_end=3290, + serialized_start=3267, + serialized_end=3415, ) @@ -1678,6 +1746,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='tick_size', full_name='ImportsPerDeveloperResults.tick_size', index=2, + number=3, type=3, cpp_type=2, 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=[ ], @@ -1690,8 +1765,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3292, - serialized_end=3381, + serialized_start=3417, + serialized_end=3525, ) @@ -1728,8 +1803,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3480, - serialized_end=3527, + serialized_start=3624, + serialized_end=3671, ) _ANALYSISRESULTS = _descriptor.Descriptor( @@ -1765,8 +1840,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3384, - serialized_end=3527, + serialized_start=3528, + serialized_end=3671, ) _METADATA_RUNTIMEPERITEMENTRY.containing_type = _METADATA @@ -1810,8 +1885,11 @@ _COMMIT.fields_by_name['files'].message_type = _COMMITFILE _COMMITSANALYSISRESULTS.fields_by_name['commits'].message_type = _COMMIT _TYPOSDATASET.fields_by_name['typos'].message_type = _TYPO -_IMPORTSPERLANGUAGE_COUNTSENTRY.containing_type = _IMPORTSPERLANGUAGE -_IMPORTSPERLANGUAGE.fields_by_name['counts'].message_type = _IMPORTSPERLANGUAGE_COUNTSENTRY +_IMPORTSPERTICK_COUNTSENTRY.containing_type = _IMPORTSPERTICK +_IMPORTSPERTICK.fields_by_name['counts'].message_type = _IMPORTSPERTICK_COUNTSENTRY +_IMPORTSPERLANGUAGE_TICKSENTRY.fields_by_name['value'].message_type = _IMPORTSPERTICK +_IMPORTSPERLANGUAGE_TICKSENTRY.containing_type = _IMPORTSPERLANGUAGE +_IMPORTSPERLANGUAGE.fields_by_name['ticks'].message_type = _IMPORTSPERLANGUAGE_TICKSENTRY _IMPORTSPERDEVELOPER_LANGUAGESENTRY.fields_by_name['value'].message_type = _IMPORTSPERLANGUAGE _IMPORTSPERDEVELOPER_LANGUAGESENTRY.containing_type = _IMPORTSPERDEVELOPER _IMPORTSPERDEVELOPER.fields_by_name['languages'].message_type = _IMPORTSPERDEVELOPER_LANGUAGESENTRY @@ -1845,6 +1923,7 @@ DESCRIPTOR.message_types_by_name['CommitsAnalysisResults'] = _COMMITSANALYSISRESULTS DESCRIPTOR.message_types_by_name['Typo'] = _TYPO DESCRIPTOR.message_types_by_name['TyposDataset'] = _TYPOSDATASET +DESCRIPTOR.message_types_by_name['ImportsPerTick'] = _IMPORTSPERTICK DESCRIPTOR.message_types_by_name['ImportsPerLanguage'] = _IMPORTSPERLANGUAGE DESCRIPTOR.message_types_by_name['ImportsPerDeveloper'] = _IMPORTSPERDEVELOPER DESCRIPTOR.message_types_by_name['ImportsPerDeveloperResults'] = _IMPORTSPERDEVELOPERRESULTS @@ -2105,12 +2184,27 @@ )) _sym_db.RegisterMessage(TyposDataset) -ImportsPerLanguage = _reflection.GeneratedProtocolMessageType('ImportsPerLanguage', (_message.Message,), dict( +ImportsPerTick = _reflection.GeneratedProtocolMessageType('ImportsPerTick', (_message.Message,), dict( CountsEntry = _reflection.GeneratedProtocolMessageType('CountsEntry', (_message.Message,), dict( - DESCRIPTOR = _IMPORTSPERLANGUAGE_COUNTSENTRY, + DESCRIPTOR = _IMPORTSPERTICK_COUNTSENTRY, + __module__ = 'pb_pb2' + # @@protoc_insertion_point(class_scope:ImportsPerTick.CountsEntry) + )) + , + DESCRIPTOR = _IMPORTSPERTICK, + __module__ = 'pb_pb2' + # @@protoc_insertion_point(class_scope:ImportsPerTick) + )) +_sym_db.RegisterMessage(ImportsPerTick) +_sym_db.RegisterMessage(ImportsPerTick.CountsEntry) + +ImportsPerLanguage = _reflection.GeneratedProtocolMessageType('ImportsPerLanguage', (_message.Message,), dict( + + TicksEntry = _reflection.GeneratedProtocolMessageType('TicksEntry', (_message.Message,), dict( + DESCRIPTOR = _IMPORTSPERLANGUAGE_TICKSENTRY, __module__ = 'pb_pb2' - # @@protoc_insertion_point(class_scope:ImportsPerLanguage.CountsEntry) + # @@protoc_insertion_point(class_scope:ImportsPerLanguage.TicksEntry) )) , DESCRIPTOR = _IMPORTSPERLANGUAGE, @@ -2118,7 +2212,7 @@ # @@protoc_insertion_point(class_scope:ImportsPerLanguage) )) _sym_db.RegisterMessage(ImportsPerLanguage) -_sym_db.RegisterMessage(ImportsPerLanguage.CountsEntry) +_sym_db.RegisterMessage(ImportsPerLanguage.TicksEntry) ImportsPerDeveloper = _reflection.GeneratedProtocolMessageType('ImportsPerDeveloper', (_message.Message,), dict( @@ -2167,7 +2261,8 @@ _TICKDEVS_DEVSENTRY._options = None _DEVSANALYSISRESULTS_TICKSENTRY._options = None _COMMENTSENTIMENTRESULTS_SENTIMENTBYTICKENTRY._options = None -_IMPORTSPERLANGUAGE_COUNTSENTRY._options = None +_IMPORTSPERTICK_COUNTSENTRY._options = None +_IMPORTSPERLANGUAGE_TICKSENTRY._options = None _IMPORTSPERDEVELOPER_LANGUAGESENTRY._options = None _ANALYSISRESULTS_CONTENTSENTRY._options = None # @@protoc_insertion_point(module_scope) diff --git a/python/setup.py b/python/setup.py index 04f2f965..903ea053 100644 --- a/python/setup.py +++ b/python/setup.py @@ -22,7 +22,7 @@ description="Python companion for github.com/src-d/hercules to visualize the results.", long_description=long_description, long_description_content_type="text/markdown", - version="10.6.2", + version="10.7.0", license="Apache-2.0", author="source{d}", author_email="machine-learning@sourced.tech",