Временные ряды #59

Merged
romanov73 merged 10 commits from influx into master 2022-10-06 16:09:37 +04:00
15 changed files with 316 additions and 34 deletions
Showing only changes of commit 5426253b39 - Show all commits

View File

@ -1,28 +1,22 @@
package ru.ulstu.extractor.ts;
import ru.ulstu.extractor.model.TimeSeriesValue;
import ru.ulstu.extractor.service.TimeSeriesService;
import java.util.List;
public abstract class AbstractTSExtractor {
private String name;
private int value;
public abstract void getAbstractTSName();
public abstract String getTSName();
public abstract void addPoint(int value);
public abstract TimeSeriesService getTimeSeriesService();
public abstract void addTS(String name, int value);
public String getName() {
return name;
public void addPoint(int value) {
}
public void setName(String name) {
this.name = name;
public void addTS(List<TimeSeriesValue> values) {
getTimeSeriesService().findOrCreate(getTSName());
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
}

View File

@ -5,30 +5,19 @@ import ru.ulstu.extractor.service.TimeSeriesService;
@Component
public class AuthorTS extends AbstractTSExtractor {
private static String name = "AuthorTimeSeries";
private static TimeSeriesService timeSeriesService;
private final TimeSeriesService timeSeriesService;
public static void setTimeSeriesService(TimeSeriesService timeSeriesService) {
AuthorTS.timeSeriesService = timeSeriesService;
public AuthorTS(TimeSeriesService timeSeriesService) {
this.timeSeriesService = timeSeriesService;
}
@Override
public void getAbstractTSName() {
timeSeriesService.findOrCreate(name);
public String getTSName() {
return "Количество Авторов";
}
@Override
public void addPoint(int value) {
}
@Override
public void addTS(String name, int value) {
}
@Override
public String getName() {
return name;
public TimeSeriesService getTimeSeriesService() {
return timeSeriesService;
}
}

View File

@ -0,0 +1,23 @@
package ru.ulstu.extractor.ts;
import org.springframework.stereotype.Component;
import ru.ulstu.extractor.service.TimeSeriesService;
@Component
public class AuthorsCommentTS extends AbstractTSExtractor {
private final TimeSeriesService timeSeriesService;
public AuthorsCommentTS(TimeSeriesService timeSeriesService) {
this.timeSeriesService = timeSeriesService;
}
@Override
public String getTSName() {
return "Количество коммитов авторов";
}
@Override
public TimeSeriesService getTimeSeriesService() {
return timeSeriesService;
}
}

View File

@ -0,0 +1,23 @@
package ru.ulstu.extractor.ts;
import org.springframework.stereotype.Component;
import ru.ulstu.extractor.service.TimeSeriesService;
@Component
public class AuthorsCompletedIssueTS extends AbstractTSExtractor {
private final TimeSeriesService timeSeriesService;
public AuthorsCompletedIssueTS(TimeSeriesService timeSeriesService) {
this.timeSeriesService = timeSeriesService;
}
@Override
public String getTSName() {
return "Количество выполненных issues авторов";
}
@Override
public TimeSeriesService getTimeSeriesService() {
return timeSeriesService;
}
}

View File

@ -0,0 +1,23 @@
package ru.ulstu.extractor.ts;
import org.springframework.stereotype.Component;
import ru.ulstu.extractor.service.TimeSeriesService;
@Component
public class AuthorsIssueTS extends AbstractTSExtractor {
private final TimeSeriesService timeSeriesService;
public AuthorsIssueTS(TimeSeriesService timeSeriesService) {
this.timeSeriesService = timeSeriesService;
}
@Override
public String getTSName() {
return "Количество issues авторов";
}
@Override
public TimeSeriesService getTimeSeriesService() {
return timeSeriesService;
}
}

View File

@ -0,0 +1,23 @@
package ru.ulstu.extractor.ts;
import org.springframework.stereotype.Component;
import ru.ulstu.extractor.service.TimeSeriesService;
@Component
public class BranchTS extends AbstractTSExtractor {
private final TimeSeriesService timeSeriesService;
public BranchTS(TimeSeriesService timeSeriesService) {
this.timeSeriesService = timeSeriesService;
}
@Override
public String getTSName() {
return "Количество веток";
}
@Override
public TimeSeriesService getTimeSeriesService() {
return timeSeriesService;
}
}

View File

@ -0,0 +1,23 @@
package ru.ulstu.extractor.ts;
import org.springframework.stereotype.Component;
import ru.ulstu.extractor.service.TimeSeriesService;
@Component
public class ClassTS extends AbstractTSExtractor {
private final TimeSeriesService timeSeriesService;
public ClassTS(TimeSeriesService timeSeriesService) {
this.timeSeriesService = timeSeriesService;
}
@Override
public String getTSName() {
return "Количество классов";
}
@Override
public TimeSeriesService getTimeSeriesService() {
return timeSeriesService;
}
}

View File

@ -0,0 +1,23 @@
package ru.ulstu.extractor.ts;
import org.springframework.stereotype.Component;
import ru.ulstu.extractor.service.TimeSeriesService;
@Component
public class CommitsTS extends AbstractTSExtractor {
private final TimeSeriesService timeSeriesService;
public CommitsTS(TimeSeriesService timeSeriesService) {
this.timeSeriesService = timeSeriesService;
}
@Override
public String getTSName() {
return "Количество коммитов во времени";
}
@Override
public TimeSeriesService getTimeSeriesService() {
return timeSeriesService;
}
}

View File

@ -0,0 +1,23 @@
package ru.ulstu.extractor.ts;
import org.springframework.stereotype.Component;
import ru.ulstu.extractor.service.TimeSeriesService;
@Component
public class DependenceTS extends AbstractTSExtractor {
private final TimeSeriesService timeSeriesService;
public DependenceTS(TimeSeriesService timeSeriesService) {
this.timeSeriesService = timeSeriesService;
}
@Override
public String getTSName() {
return "Количество зависимостей";
}
@Override
public TimeSeriesService getTimeSeriesService() {
return timeSeriesService;
}
}

View File

@ -0,0 +1,23 @@
package ru.ulstu.extractor.ts;
import org.springframework.stereotype.Component;
import ru.ulstu.extractor.service.TimeSeriesService;
@Component
public class EntityTS extends AbstractTSExtractor {
private final TimeSeriesService timeSeriesService;
public EntityTS(TimeSeriesService timeSeriesService) {
this.timeSeriesService = timeSeriesService;
}
@Override
public String getTSName() {
return "Количество сущностей";
}
@Override
public TimeSeriesService getTimeSeriesService() {
return timeSeriesService;
}
}

View File

@ -0,0 +1,23 @@
package ru.ulstu.extractor.ts;
import org.springframework.stereotype.Component;
import ru.ulstu.extractor.service.TimeSeriesService;
@Component
public class FileTS extends AbstractTSExtractor {
private final TimeSeriesService timeSeriesService;
public FileTS(TimeSeriesService timeSeriesService) {
this.timeSeriesService = timeSeriesService;
}
@Override
public String getTSName() {
return "Количество файлов";
}
@Override
public TimeSeriesService getTimeSeriesService() {
return timeSeriesService;
}
}

View File

@ -0,0 +1,23 @@
package ru.ulstu.extractor.ts;
import org.springframework.stereotype.Component;
import ru.ulstu.extractor.service.TimeSeriesService;
@Component
public class InterfaceTS extends AbstractTSExtractor {
private final TimeSeriesService timeSeriesService;
public InterfaceTS(TimeSeriesService timeSeriesService) {
this.timeSeriesService = timeSeriesService;
}
@Override
public String getTSName() {
return "Количество интерфейсов";
}
@Override
public TimeSeriesService getTimeSeriesService() {
return timeSeriesService;
}
}

View File

@ -0,0 +1,23 @@
package ru.ulstu.extractor.ts;
import org.springframework.stereotype.Component;
import ru.ulstu.extractor.service.TimeSeriesService;
@Component
public class IssuesTS extends AbstractTSExtractor {
private final TimeSeriesService timeSeriesService;
public IssuesTS(TimeSeriesService timeSeriesService) {
this.timeSeriesService = timeSeriesService;
}
@Override
public String getTSName() {
return "Количество issues созданных во времени";
}
@Override
public TimeSeriesService getTimeSeriesService() {
return null;
}
}

View File

@ -0,0 +1,23 @@
package ru.ulstu.extractor.ts;
import org.springframework.stereotype.Component;
import ru.ulstu.extractor.service.TimeSeriesService;
@Component
public class ProcessTS extends AbstractTSExtractor {
private final TimeSeriesService timeSeriesService;
public ProcessTS(TimeSeriesService timeSeriesService) {
this.timeSeriesService = timeSeriesService;
}
@Override
public String getTSName() {
return "Количество процессов";
}
@Override
public TimeSeriesService getTimeSeriesService() {
return timeSeriesService;
}
}

View File

@ -0,0 +1,23 @@
package ru.ulstu.extractor.ts;
import org.springframework.stereotype.Component;
import ru.ulstu.extractor.service.TimeSeriesService;
@Component
public class StarTS extends AbstractTSExtractor {
private final TimeSeriesService timeSeriesService;
public StarTS(TimeSeriesService timeSeriesService) {
this.timeSeriesService = timeSeriesService;
}
@Override
public String getTSName() {
return "Количество звезд";
}
@Override
public TimeSeriesService getTimeSeriesService() {
return timeSeriesService;
}
}