@@ -136,7 +136,7 @@ public class TagCountView extends ViewPart {
136136 FigureCanvas cntCanvas ;
137137 XYGraph cntGraph ;
138138 HashMap <String , Trace > cntTraceMap = new HashMap <String , Trace >();
139- LinkedMap <String , int []> valueMap = new LinkedMap <String , int []>();
139+ LinkedMap <String , float []> valueMap = new LinkedMap <String , float []>();
140140
141141 private String objType ;
142142 private String date ;
@@ -690,17 +690,17 @@ private void drawStackCountGraph() {
690690 cntGraph .removeTrace (t );
691691 }
692692 cntTraceMap .clear ();
693- int [] stackedValue = new int [1440 ];
694- LinkedMap <String , int []> tempMap = new LinkedMap <String , int []>();
693+ float [] stackedValue = new float [1440 ];
694+ LinkedMap <String , float []> tempMap = new LinkedMap <String , float []>();
695695 Enumeration <ENTRY > entries = valueMap .entries ();
696696 while (entries .hasMoreElements ()) {
697697 ENTRY entry = entries .nextElement ();
698698 String key = (String ) entry .getKey ();
699- int [] values = (int []) entry .getValue ();
699+ float [] values = (float []) entry .getValue ();
700700 for (int i = 0 ; i < values .length ; i ++) {
701701 stackedValue [i ] += values [i ];
702702 }
703- int [] copiedArray = new int [stackedValue .length ];
703+ float [] copiedArray = new float [stackedValue .length ];
704704 System .arraycopy (stackedValue , 0 , copiedArray , 0 , stackedValue .length );
705705 tempMap .putFirst (key , copiedArray );
706706 }
@@ -709,7 +709,7 @@ private void drawStackCountGraph() {
709709 while (entries2 .hasMoreElements ()) {
710710 ENTRY entry = entries2 .nextElement ();
711711 String key = (String ) entry .getKey ();
712- int [] values = (int []) entry .getValue ();
712+ float [] values = (float []) entry .getValue ();
713713 Trace trace = getCountTrace (key );
714714 CircularBufferDataProvider provider = (CircularBufferDataProvider )trace .getDataProvider ();
715715 provider .clearTrace ();
@@ -824,11 +824,11 @@ public void process(DataInputX in) throws IOException {
824824 dataList .add (data );
825825 data .tagName = in .readText ();
826826 data .totalSize = in .readInt ();
827- data .totalCnt = in .readLong ();
827+ data .totalCnt = in .readFloat ();
828828 int size = in .readInt ();
829829 for (int i = 0 ; i < size ; i ++) {
830830 Value v = in .readValue ();
831- long cnt = in .readLong ();
831+ float cnt = in .readFloat ();
832832 data .addValue (v , cnt );
833833 }
834834 }
@@ -861,12 +861,12 @@ public void process(DataInputX in) throws IOException {
861861 static class TagData {
862862 String tagName ;
863863 List <Value > valueList = new ArrayList <Value >();
864- List <Long > cntList = new ArrayList <Long >();
864+ List <Float > cntList = new ArrayList <Float >();
865865 List <String > strValueList ;
866866 int totalSize ;
867- long totalCnt ;
867+ float totalCnt ;
868868
869- void addValue (Value v , long cnt ) {
869+ void addValue (Value v , float cnt ) {
870870 valueList .add (v );
871871 cntList .add (cnt );
872872 }
@@ -896,7 +896,7 @@ private void loadTagCount(final String tagGroup, final String tagName, final Str
896896 ExUtil .asyncRun (new Runnable () {
897897 public void run () {
898898 TcpProxy tcp = TcpProxy .getTcpProxy (serverId );
899- final int [] valueArray = new int [1440 ];
899+ final float [] valueArray = new float [1440 ];
900900 try {
901901 MapPack param = new MapPack ();
902902 param .put ("objType" , objType );
@@ -906,8 +906,8 @@ public void run() {
906906 param .put ("date" , date );
907907 tcp .process (RequestCmd .TAGCNT_TAG_VALUE_DATA , param , new INetReader () {
908908 public void process (DataInputX in ) throws IOException {
909- int [] values = in .readArray (new int [0 ]);
910- for (int i = 0 ; i < values .length ; i ++) {
909+ float [] values = in .readArray (new float [0 ]);
910+ for (int i = 0 ; i < values .length ; i ++) {
911911 valueArray [i ] = values [i ];
912912 }
913913 }
@@ -935,7 +935,7 @@ private void loadTotalCount(final String tagGroup) {
935935 ExUtil .asyncRun (new Runnable () {
936936 public void run () {
937937 TcpProxy tcp = TcpProxy .getTcpProxy (serverId );
938- final List <Integer > valueList = new ArrayList <Integer >();
938+ final List <Float > valueList = new ArrayList <Float >();
939939 try {
940940 MapPack param = new MapPack ();
941941 param .put ("tagGroup" , tagGroup );
@@ -945,7 +945,7 @@ public void run() {
945945 param .put ("date" , date );
946946 tcp .process (RequestCmd .TAGCNT_TAG_VALUE_DATA , param , new INetReader () {
947947 public void process (DataInputX in ) throws IOException {
948- int [] values = in .readArray (new int [0 ]);
948+ float [] values = in .readArray (new float [0 ]);
949949 for (int i = 0 ; i < values .length ; i ++) {
950950 valueList .add (values [i ]);
951951 }
@@ -963,7 +963,7 @@ public void run() {
963963 provider .clearTrace ();
964964 for (int i = 0 ; i < valueList .size (); i ++) {
965965 double x = stime + (DateUtil .MILLIS_PER_MINUTE * i + DateUtil .MILLIS_PER_SECOND * 30 );
966- int value = valueList .get (i );
966+ float value = valueList .get (i );
967967 provider .addSample (new Sample (x , value ));
968968 }
969969 adjustYAxisRange (totalGraph , provider );
0 commit comments