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).

1  
!7
2  
3  
static long offset;
4  
5  
p {
6  
  showBigText("Requests!", "getRequests", 1000);
7  
  hideConsole();
8  
  quietSleep();
9  
}
10  
11  
static S[] getRequests() {
12  
  long time = sysNow();
13  
  S s = ai1_requestsPlusServing();
14  
  time = sysNow()-time;
15  
  long n = parseFirstLong(s);
16  
  if (offset == 0) offset = -n+1; else --offset;
17  
  n += offset;
18  
  s = replaceFirstLong(s, n);
19  
  s = replaceSecondLong(s, parseSecondLong(s)-1);
20  
  S shorT = swapFirstTwoLongs(s).replace(" [", ".").replace("]", "");
21  
  ret new S[] { shorT, shorT + "|" + time + " ms" };
22  
}

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: 593 / 767
Version history: 15 change(s)
Referenced in: [show references]