- On phone: install App Inspector (669 kB) from Play Store
- On phone: with the help of App Inspector find package names of apps you want to uninstall
- On phone: enable USB debugging. Settings -> About phone -> Software information -> Tap on "Build number" seven times. Then Settings -> Developer options -> enable "USB debugging". Documentation
- On computer: download and install Android SDK Platform Tools
- Connect the phone to the computer with a USB cable, allow USB debugging
- On computer: adb devices should show connected phone
- adb shell pm list packages -f should show all installed packages
- adb shell pm uninstall -k --user 0 <package name from step 2>
Example:
adb shell pm uninstall -k --user 0 com.samsung.ecomm.global.in
25 окт. 2020 г.
Uninstall bloatware on Samsung J7, Samsung J5 without root via adb
3 авг. 2020 г.
Tools for performance analysis in Node.js
- node-tick-processor easy-to-install processor for the v8 profiler log
- node-gcstats exposes stats about V8 GC after it has been executed
- 0x single-command flamegraph profiling
- autocannon HTTP/1.1 benchmarking tool written in node, with support for HTTP pipelining and HTTPS
- k6.io open source load testing tool and SaaS for engineering teams
- why-did-you-render monkey patches React to notify you about avoidable re-renders (works with React Native as well)
3 июн. 2020 г.
Profiling JavaScript code with Linux perf command
Profile V8 internals on Linux:
$ perf record d8 --perf-basic-prof test.js
$ perf report
More examples: http://www.brendangregg.com/perf.html#Examples
Easy installation of V8 engine: https://www.npmjs.com/package/jsvu
Customize output of Benchmark.js results
By default Benchmark.js recommends the following code to view results of a benchmark:
.on('cycle', function(event) {
console.log(String(event.target));
})
Example output:
<test 1> x 123,456 ops/sec ±5.67% (75 runs sampled)
<test 2> x 112,678 ops/sec ±4.56% (77 runs sampled)
The problem is that operations per second are not additive: if <test 2> has some added/removed code, we don't know the cost of that code in milliseconds (how many milliseconds it adds or removes from the total execution time).
To get that information, change the output code as follows:
.on('cycle', function(event) {
const stats = event.target.stats;
const sortedSample = stats.sample.sort((a, b) => b - a);
const median = sortedSample[sortedSample.length >> 1];
const fastest = sortedSample[sortedSample.length - 1];
console.log(
String(event.target),
'\n\tfastest:', fastest * 1000000, 'μs/op',
'\n\tmean:', stats.mean * 1000000, 'μs/op',
// '±' + stats.rme.toFixed(2) + '%',
'\n\tmedian:', median * 1000000, 'μs/op'
);
})
here stats.rme means "relative margin of error" and is the same "±5.67%" as in example output above, so there is no need to duplicate it
Same code in TypeScript:
.on('cycle', function(event: { target: { stats: Stats }; }) {
const stats: Stats = event.target.stats;
const sortedSample = stats.sample.sort((a, b) => b - a);
const median = sortedSample[sortedSample.length >> 1];
const fastest = sortedSample[sortedSample.length - 1];
console.log(
String(event.target),
'\n\tfastest:', fastest * 1000000, 'μs/op',
'\n\tmean:', stats.mean * 1000000, 'μs/op',
'\n\tmedian:', median * 1000000, 'μs/op'
);
})
Type description (borrowed from https://benchmarkjs.com/docs):
type Stats = {
/** The sample standard deviation. */
deviation: number,
/** The sample arithmetic mean (secs). */
mean: number,
/** The margin of error. */
moe: number,
/** The relative margin of error (expressed as a percentage of the mean). */
rme: number,
/** The array of sampled periods. */
sample: number[],
/** The standard error of the mean. */
sem: number,
/** The sample variance. */
variance: number
};
22 апр. 2020 г.
Location of browser extensions in macOS
10 апр. 2020 г.
Detect resized images on a page
This script detects resized images and background images, which consume your traffic and time. Images are visually marked as 1px dotted red, detailed information is written to the console of your DevTools.
https://gist.github.com/victor-homyakov/9c29b553270c5c71135a1746ab93325d
https://gist.github.com/victor-homyakov/9c29b553270c5c71135a1746ab93325d
7 апр. 2020 г.
Подписаться на:
Сообщения (Atom)