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

22
LINES

< > BotCompany Repo | #1011283 // Show web server requests as big text [# currently serving + total requests]

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

Libraryless. Click here for Pure Java version (7343L/50K/180K).

!7

static long offset;

p {
  showBigText("Requests!", "getRequests", 1000);
  hideConsole();
  quietSleep();
}

static S[] getRequests() {
  long time = sysNow();
  S s = ai1_requestsPlusServing();
  time = sysNow()-time;
  long n = parseFirstLong(s);
  if (offset == 0) offset = -n+1; else --offset;
  n += offset;
  s = replaceFirstLong(s, n);
  s = replaceSecondLong(s, parseSecondLong(s)-1);
  S shorT = swapFirstTwoLongs(s).replace(" [", ".").replace("]", "");
  ret new S[] { shorT, shorT + "|" + time + " ms" };
}

Author comment

Began life as a copy of #1011280

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1011283
Snippet name: Show web server requests as big text [# currently serving + total requests]
Eternal ID of this version: #1011283/16
Text MD5: 652714d62cebe84cc35de777da843e95
Transpilation MD5: d0ee87757646174480330e9ae7d9840e
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-24 04:05:02
Source code size: 545 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 470 / 619
Version history: 15 change(s)
Referenced in: [show references]