Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

16
LINES

< > BotCompany Repo | #1014278 // Show old+new server system load (OK)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Uses 994K of libraries. Click here for Pure Java version (7183L/37K).

!7

static int timeout = 10000;

// TODO: spam

p {
  final PGauge gauge1 = pMain(PGauge);
  final PGauge gauge2 = pMain(PGauge);
  swing { moveWindowToTheRight(pFrame(gauge2), pFrame(gauge1).getWidth()+20); }

  repeat with sleep 2 {
    pgauge_showSystemLoad(gauge1, "Old server load", parseDouble(print(loadPageWithTimeout(timeout, "http://botcompany.de/1001951/raw/system+load"))));
    pgauge_showSystemLoad(gauge2, "New server load", parseDouble(print(loadPageWithTimeout(timeout, "http://butter.botcompany.de:8080/1001951/raw/system+load"))));
  }
}

Author comment

Began life as a copy of #1014277

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1014278
Snippet name: Show old+new server system load (OK)
Eternal ID of this version: #1014278/15
Text MD5: 2a4d1f565b300e79b01a5af232e77477
Transpilation MD5: cee9fcc979ff7c2fdae56677ee517ac6
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-19 23:22:32
Source code size: 571 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 493 / 1057
Version history: 14 change(s)
Referenced in: #1014291 - Show system load of all 3 servers (OK)