File tree 3 files changed +8
-0
lines changed
src/main/java/org/cyberpwn/react
3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 1
1
package org .cyberpwn .react .network ;
2
2
3
+ import org .cyberpwn .react .L ;
3
4
import org .cyberpwn .react .util .GMap ;
4
5
import org .json .JSONObject ;
5
6
@@ -24,10 +25,12 @@ public void run() {
24
25
DataInputStream i = new DataInputStream (s .getInputStream ());
25
26
DataOutputStream o = new DataOutputStream (s .getOutputStream ());
26
27
PacketRequest pr = new PacketRequest (ns .getUsername (), ns .getPassword (), PacketRequestType .GET_SAMPLES .toString ());
28
+ //L.n("OUT: " + pr.toString());
27
29
o .writeUTF (pr .toString ());
28
30
o .flush ();
29
31
String response = i .readUTF ();
30
32
PacketResponse ps = new PacketResponse (new JSONObject (response ));
33
+ //L.n("IN: " + ps.toString());
31
34
GMap <String , Double > data = new GMap <>();
32
35
String console = "" ;
33
36
Original file line number Diff line number Diff line change 1
1
package org .cyberpwn .react .network ;
2
2
3
+ import org .cyberpwn .react .L ;
3
4
import org .cyberpwn .react .util .GMap ;
4
5
import org .json .JSONObject ;
5
6
@@ -24,10 +25,12 @@ public void run() {
24
25
DataInputStream i = new DataInputStream (s .getInputStream ());
25
26
DataOutputStream o = new DataOutputStream (s .getOutputStream ());
26
27
PacketRequest pr = new PacketRequest (ns .getUsername (), ns .getPassword (), PacketRequestType .GET_BASIC .toString ());
28
+ L .n ("OUT: " + pr .toString ());
27
29
o .writeUTF (pr .toString ());
28
30
o .flush ();
29
31
String response = i .readUTF ();
30
32
PacketResponse ps = new PacketResponse (new JSONObject (response ));
33
+ L .n ("IN: " + ps .toString ());
31
34
GMap <String , String > data = new GMap <>();
32
35
33
36
if (ps .getString ("type" ).equals ("OK" )) {
Original file line number Diff line number Diff line change @@ -442,6 +442,8 @@ public void push(GList<String> actions) {
442
442
443
443
public void push (GMap <String , Double > sample , String console ) {
444
444
sample .put ("rct" , sample .get ("rct" ) / 1000000.0 );
445
+ sample .put ("mah/s" , sample .get ("mah/s" ) / 1024D / 1024D );
446
+ sample .put ("mem" , sample .get ("mem" ) / 1024 / 1024 );
445
447
lastConsole = StringUtils .repeat ("\n " , 40 ) + console ;
446
448
lastLog = StringUtils .repeat ("\n " , 40 ) + L .log ;
447
449
You can’t perform that action at this time.
0 commit comments