This commit is contained in:
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
"use strict";(function(){function f(e){const r=[];typeof e=="number"&&r.push("code/timeOrigin",e);function t(o){r.push(o,Date.now())}function m(){const o=[];for(let i=0;i<r.length;i+=2)o.push({name:r[i],startTime:r[i+1]});return o}return{mark:t,getMarks:m}}function c(){if(typeof performance=="object"&&typeof performance.mark=="function"&&!performance.nodeTiming)return typeof performance.timeOrigin!="number"&&!performance.timing?f():{mark(e){performance.mark(e)},getMarks(){let e=performance.timeOrigin;typeof e!="number"&&(e=performance.timing.navigationStart||performance.timing.redirectStart||performance.timing.fetchStart);const r=[{name:"code/timeOrigin",startTime:Math.round(e)}];for(const t of performance.getEntriesByType("mark"))r.push({name:t.name,startTime:Math.round(e+t.startTime)});return r}};if(typeof process=="object"){const e=performance?.timeOrigin??Math.round((require.__$__nodeRequire||require)("perf_hooks").performance.timeOrigin);return f(e)}else return console.trace("perf-util loaded in UNKNOWN environment"),f()}function a(e){return e.MonacoPerformanceMarks||(e.MonacoPerformanceMarks=c()),e.MonacoPerformanceMarks}var n;typeof global=="object"?n=global:typeof self=="object"?n=self:n={},typeof define=="function"?define([],function(){return a(n)}):typeof module=="object"&&typeof module.exports=="object"?module.exports=a(n):(console.trace("perf-util defined in UNKNOWN context (neither requirejs or commonjs)"),n.perf=a(n))})();
|
||||
|
||||
//# sourceMappingURL=https://main.vscode-cdn.net/sourcemaps/ea1445cc7016315d0f5728f8e8b12a45dc0a7286/core/vs/base/common/performance.js.map
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,5 @@
|
||||
/*!--------------------------------------------------------
|
||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
*--------------------------------------------------------*/define("vs/base/common/worker/simpleWorker.nls",{"vs/base/common/platform":["_"]});
|
||||
|
||||
//# sourceMappingURL=https://main.vscode-cdn.net/sourcemaps/ea1445cc7016315d0f5728f8e8b12a45dc0a7286/core/vs/base/common/worker/simpleWorker.nls.js.map
|
64
vscode-server-linux-x64-web/out/vs/base/node/cpuUsage.sh
Executable file
64
vscode-server-linux-x64-web/out/vs/base/node/cpuUsage.sh
Executable file
@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
|
||||
function get_total_cpu_time() {
|
||||
# Read the first line of /proc/stat and remove the cpu prefix
|
||||
CPU=(`sed -n 's/^cpu\s//p' /proc/stat`)
|
||||
|
||||
# Sum all of the values in CPU to get total time
|
||||
for VALUE in "${CPU[@]}"; do
|
||||
let $1=$1+$VALUE
|
||||
done
|
||||
}
|
||||
|
||||
TOTAL_TIME_BEFORE=0
|
||||
get_total_cpu_time TOTAL_TIME_BEFORE
|
||||
|
||||
# Loop over the arguments, which are a list of PIDs
|
||||
# The 13th and 14th words in /proc/<PID>/stat are the user and system time
|
||||
# the process has used, so sum these to get total process run time
|
||||
declare -a PROCESS_BEFORE_TIMES
|
||||
ITER=0
|
||||
for PID in "$@"; do
|
||||
if [ -f /proc/$PID/stat ]
|
||||
then
|
||||
PROCESS_STATS=`cat /proc/$PID/stat`
|
||||
PROCESS_STAT_ARRAY=($PROCESS_STATS)
|
||||
|
||||
let PROCESS_TIME_BEFORE="${PROCESS_STAT_ARRAY[13]}+${PROCESS_STAT_ARRAY[14]}"
|
||||
else
|
||||
let PROCESS_TIME_BEFORE=0
|
||||
fi
|
||||
|
||||
PROCESS_BEFORE_TIMES[$ITER]=$PROCESS_TIME_BEFORE
|
||||
((++ITER))
|
||||
done
|
||||
|
||||
# Wait for a second
|
||||
sleep 1
|
||||
|
||||
TOTAL_TIME_AFTER=0
|
||||
get_total_cpu_time TOTAL_TIME_AFTER
|
||||
|
||||
# Check the user and system time sum of each process again and compute the change
|
||||
# in process time used over total system time
|
||||
ITER=0
|
||||
for PID in "$@"; do
|
||||
if [ -f /proc/$PID/stat ]
|
||||
then
|
||||
PROCESS_STATS=`cat /proc/$PID/stat`
|
||||
PROCESS_STAT_ARRAY=($PROCESS_STATS)
|
||||
|
||||
let PROCESS_TIME_AFTER="${PROCESS_STAT_ARRAY[13]}+${PROCESS_STAT_ARRAY[14]}"
|
||||
else
|
||||
let PROCESS_TIME_AFTER=${PROCESS_BEFORE_TIMES[$ITER]}
|
||||
fi
|
||||
|
||||
PROCESS_TIME_BEFORE=${PROCESS_BEFORE_TIMES[$ITER]}
|
||||
let PROCESS_DELTA=$PROCESS_TIME_AFTER-$PROCESS_TIME_BEFORE
|
||||
let TOTAL_DELTA=$TOTAL_TIME_AFTER-$TOTAL_TIME_BEFORE
|
||||
CPU_USAGE=`echo "$((100*$PROCESS_DELTA/$TOTAL_DELTA))"`
|
||||
|
||||
# Parent script reads from stdout, so echo result to be read
|
||||
echo $CPU_USAGE
|
||||
((++ITER))
|
||||
done
|
39
vscode-server-linux-x64-web/out/vs/base/node/ps.sh
Executable file
39
vscode-server-linux-x64-web/out/vs/base/node/ps.sh
Executable file
@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
PAGESIZE=`getconf PAGESIZE`;
|
||||
TOTAL_MEMORY=`cat /proc/meminfo | head -n 1 | awk '{print $2}'`;
|
||||
|
||||
# Mimic the output of ps -ax -o pid=,ppid=,pcpu=,pmem=,command=
|
||||
# Read all numeric subdirectories in /proc
|
||||
for pid in `cd /proc && ls -d [0-9]*`
|
||||
do {
|
||||
if [ -e /proc/$pid/stat ]
|
||||
then
|
||||
echo $pid;
|
||||
|
||||
# ppid is the word at index 4 in the stat file for the process
|
||||
awk '{print $4}' /proc/$pid/stat;
|
||||
|
||||
# pcpu - calculation will be done later, this is a placeholder value
|
||||
echo "0.0"
|
||||
|
||||
# pmem - ratio of the process's working set size to total memory.
|
||||
# use the page size to convert to bytes, total memory is in KB
|
||||
# multiplied by 100 to get percentage, extra 10 to be able to move
|
||||
# the decimal over by one place
|
||||
RESIDENT_SET_SIZE=`awk '{print $24}' /proc/$pid/stat`;
|
||||
PERCENT_MEMORY=$(((1000 * $PAGESIZE * $RESIDENT_SET_SIZE) / ($TOTAL_MEMORY * 1024)));
|
||||
if [ $PERCENT_MEMORY -lt 10 ]
|
||||
then
|
||||
# replace the last character with 0. the last character
|
||||
echo $PERCENT_MEMORY | sed 's/.$/0.&/'; #pmem
|
||||
else
|
||||
# insert . before the last character
|
||||
echo $PERCENT_MEMORY | sed 's/.$/.&/';
|
||||
fi
|
||||
|
||||
# cmdline
|
||||
xargs -0 < /proc/$pid/cmdline;
|
||||
fi
|
||||
} | tr "\n" "\t"; # Replace newlines with tab so that all info for a process is shown on one line
|
||||
echo; # But add new lines between processes
|
||||
done
|
49
vscode-server-linux-x64-web/out/vs/base/worker/workerMain.js
Normal file
49
vscode-server-linux-x64-web/out/vs/base/worker/workerMain.js
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user