-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from ls1intum/develop
Develop
- Loading branch information
Showing
17 changed files
with
602 additions
and
72 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package de.tum.cit.ase.domain; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import jakarta.persistence.*; | ||
import java.time.ZonedDateTime; | ||
|
||
@Entity | ||
public class StatsBySecond { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@Column(name = "date_time", nullable = false) | ||
private ZonedDateTime dateTime; | ||
|
||
@Column(name = "number_of_requests", nullable = false) | ||
private long numberOfRequests; | ||
|
||
@Column(name = "avg_response_time", nullable = false) | ||
private long avgResponseTime; | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "simulation_stats_id", nullable = false) | ||
@JsonIgnore | ||
private SimulationStats simulationStats; | ||
|
||
public Long getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Long id) { | ||
this.id = id; | ||
} | ||
|
||
public ZonedDateTime getDateTime() { | ||
return dateTime; | ||
} | ||
|
||
public void setDateTime(ZonedDateTime dateTime) { | ||
this.dateTime = dateTime; | ||
} | ||
|
||
public long getNumberOfRequests() { | ||
return numberOfRequests; | ||
} | ||
|
||
public void setNumberOfRequests(long numberOfRequests) { | ||
this.numberOfRequests = numberOfRequests; | ||
} | ||
|
||
public long getAvgResponseTime() { | ||
return avgResponseTime; | ||
} | ||
|
||
public void setAvgResponseTime(long avgResponseTime) { | ||
this.avgResponseTime = avgResponseTime; | ||
} | ||
|
||
public SimulationStats getSimulationStats() { | ||
return simulationStats; | ||
} | ||
|
||
public void setSimulationStats(SimulationStats simulationStats) { | ||
this.simulationStats = simulationStats; | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/java/de/tum/cit/ase/repository/StatsBySecondRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package de.tum.cit.ase.repository; | ||
|
||
import de.tum.cit.ase.domain.StatsBySecond; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface StatsBySecondRepository extends JpaRepository<StatsBySecond, Long> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/resources/config/liquibase/changelog/00000000000016_add_stats_by_second.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<databaseChangeLog | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd | ||
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd"> | ||
|
||
<changeSet id="00000000000016" author="valentin-boehm"> | ||
<createTable tableName="stats_by_second"> | ||
<column name="id" type="bigint" autoIncrement="true" startWith="0"> | ||
<constraints primaryKey="true" nullable="false"/> | ||
</column> | ||
<column name="number_of_requests" type="int"/> | ||
<column name="avg_response_time" type="bigint"/> | ||
<column name="simulation_stats_id" type="bigint"/> | ||
<column name="date_time" type="timestamp"/> | ||
</createTable> | ||
</changeSet> | ||
</databaseChangeLog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../app/entities/simulation/statsByMinute.ts → ...pp/app/entities/simulation/statsByTime.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.