parent
8af22ed469
commit
fa0329dd6b
|
@ -1,98 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<class-diagram version="1.1.4" icons="true" always-add-relationships="false" generalizations="true" realizations="true"
|
||||
associations="true" dependencies="false" nesting-relationships="true">
|
||||
<class id="1" language="java" name="java.util.Calendar" project="bench4q-agent"
|
||||
file="C:/Program Files/Java/jdk1.7.0_67/jre/lib/rt.jar" binary="true" corner="BOTTOM_RIGHT">
|
||||
<position height="53" width="304" x="307" y="-914"/>
|
||||
<display autosize="false" stereotype="true" package="true" initial-value="false" signature="true" accessors="true"
|
||||
visibility="true">
|
||||
<attributes public="true" package="true" protected="true" private="true" static="true"/>
|
||||
<operations public="true" package="true" protected="true" private="true" static="true"/>
|
||||
</display>
|
||||
</class>
|
||||
<class id="2" language="java" name="java.util.JapaneseImperialCalendar" project="bench4q-agent"
|
||||
file="C:/Program Files/Java/jdk1.7.0_67/jre/lib/rt.jar" binary="true" corner="BOTTOM_RIGHT">
|
||||
<position height="53" width="221" x="767" y="-707"/>
|
||||
<display autosize="false" stereotype="true" package="true" initial-value="false" signature="true" accessors="true"
|
||||
visibility="true">
|
||||
<attributes public="true" package="true" protected="true" private="true" static="true"/>
|
||||
<operations public="true" package="true" protected="true" private="true" static="true"/>
|
||||
</display>
|
||||
</class>
|
||||
<class id="3" language="java" name="java.util.GregorianCalendar" project="clif-core"
|
||||
file="C:/Program Files/Java/jdk1.7.0_67/jre/lib/rt.jar" binary="true" corner="BOTTOM_RIGHT">
|
||||
<position height="53" width="239" x="196" y="-715"/>
|
||||
<display autosize="false" stereotype="true" package="true" initial-value="false" signature="true" accessors="true"
|
||||
visibility="true">
|
||||
<attributes public="true" package="true" protected="true" private="true" static="true"/>
|
||||
<operations public="true" package="true" protected="true" private="true" static="true"/>
|
||||
</display>
|
||||
</class>
|
||||
<class id="4" language="java" name="sun.util.BuddhistCalendar" project="bench4q-master"
|
||||
file="C:/Program Files/Java/jdk1.7.0_67/jre/lib/rt.jar" binary="true" corner="BOTTOM_RIGHT">
|
||||
<position height="53" width="176" x="-30" y="-540"/>
|
||||
<display autosize="false" stereotype="true" package="true" initial-value="false" signature="true" accessors="true"
|
||||
visibility="true">
|
||||
<attributes public="true" package="true" protected="true" private="true" static="true"/>
|
||||
<operations public="true" package="true" protected="true" private="true" static="true"/>
|
||||
</display>
|
||||
</class>
|
||||
<class id="5" language="java" name="org.apache.log4j.RollingCalendar" project="clif-core"
|
||||
file="/clif-core/lib/log4j-1.2.8.jar" binary="true" corner="BOTTOM_RIGHT">
|
||||
<position height="53" width="190" x="191" y="-545"/>
|
||||
<display autosize="false" stereotype="true" package="true" initial-value="false" signature="true" accessors="true"
|
||||
visibility="true">
|
||||
<attributes public="true" package="true" protected="true" private="true" static="true"/>
|
||||
<operations public="true" package="true" protected="true" private="true" static="true"/>
|
||||
</display>
|
||||
</class>
|
||||
<class id="6" language="java" name="org.apache.log4j.RollingCalendar" project="bench4q-web"
|
||||
file="C:/Users/chentienan/.m2/repository/com/github/tomakehurst/wiremock/1.46/wiremock-1.46-standalone.jar"
|
||||
binary="true" corner="BOTTOM_RIGHT">
|
||||
<position height="53" width="190" x="402" y="-525"/>
|
||||
<display autosize="false" stereotype="true" package="true" initial-value="false" signature="true" accessors="true"
|
||||
visibility="true">
|
||||
<attributes public="true" package="true" protected="true" private="true" static="true"/>
|
||||
<operations public="true" package="true" protected="true" private="true" static="true"/>
|
||||
</display>
|
||||
</class>
|
||||
<class id="7" language="java" name="org.apache.log4j.RollingCalendar" project="bench4q-agent"
|
||||
file="C:/Users/chentienan/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar" binary="true" corner="BOTTOM_RIGHT">
|
||||
<position height="53" width="190" x="610" y="-615"/>
|
||||
<display autosize="false" stereotype="true" package="true" initial-value="false" signature="true" accessors="true"
|
||||
visibility="true">
|
||||
<attributes public="true" package="true" protected="true" private="true" static="true"/>
|
||||
<operations public="true" package="true" protected="true" private="true" static="true"/>
|
||||
</display>
|
||||
</class>
|
||||
<generalization id="8">
|
||||
<end type="SOURCE" refId="5"/>
|
||||
<end type="TARGET" refId="3"/>
|
||||
</generalization>
|
||||
<generalization id="9">
|
||||
<end type="SOURCE" refId="7"/>
|
||||
<end type="TARGET" refId="3"/>
|
||||
</generalization>
|
||||
<generalization id="10">
|
||||
<end type="SOURCE" refId="6"/>
|
||||
<end type="TARGET" refId="3"/>
|
||||
</generalization>
|
||||
<generalization id="11">
|
||||
<end type="SOURCE" refId="4"/>
|
||||
<end type="TARGET" refId="3"/>
|
||||
</generalization>
|
||||
<generalization id="12">
|
||||
<end type="SOURCE" refId="3"/>
|
||||
<end type="TARGET" refId="1"/>
|
||||
</generalization>
|
||||
<generalization id="13">
|
||||
<end type="SOURCE" refId="2"/>
|
||||
<end type="TARGET" refId="1"/>
|
||||
</generalization>
|
||||
<classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
|
||||
accessors="true" visibility="true">
|
||||
<attributes public="true" package="true" protected="true" private="true" static="true"/>
|
||||
<operations public="true" package="true" protected="true" private="true" static="true"/>
|
||||
</classifier-display>
|
||||
<association-display labels="true" multiplicity="true"/>
|
||||
</class-diagram>
|
|
@ -164,8 +164,8 @@ public class Test_RunningAgent extends TestBase_MakeUpTestPlan {
|
|||
assertEquals(target.getPoints().get(i).getTimeInSecond(),
|
||||
scheduleModel.getPoints().get(i).getTimeInSecond());
|
||||
assertEquals(
|
||||
(int) (scheduleModel.getPoints().get(i).getLoad() * ratio),
|
||||
target.getPoints().get(i).getLoad());
|
||||
Math.round(scheduleModel.getPoints().get(i).getLoad()
|
||||
* ratio), target.getPoints().get(i).getLoad());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@ public class ScheduleModel {
|
|||
ScheduleModel result = new ScheduleModel();
|
||||
for (PointModel old : this.getPoints()) {
|
||||
result.getPoints().add(
|
||||
new PointModel(old.getTimeInSecond(),
|
||||
(int) (old.getLoad() * ratio)));
|
||||
new PointModel(old.getTimeInSecond(), (int) Math.round(old
|
||||
.getLoad() * ratio)));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue