Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
xterm-benchmark
Advanced tools
Readme
Library to create and run automated performance test cases.
The library and the cmdline tool are in alpha state and likely to see heavy API changes.
Usage: xterm-benchmark [files]
Options:
-v, --version output the version number
-t, --tree <file> show contex and perf case tree
-s, --single <path> run single context or perf case
-r, --repeat <num> repeat cases <num> times
-t, --timeout <num> set timeout to <num> msec
-o, --output <path> set output path (defaults to <APP_PATH>/<EPOCH>.log)
-S, --silent no console log output
-j, --json output json to stdout, equals "-S -l /dev/stdout"
-f, --full include full results in reports
-F, --fail also fail on missings
-b, --baseline mark run as baseline data
-c, --config <path> path to config file
-e, --eval eval run against baseline data
-a, --against <path> baseline data path to eval against
-h, --help output usage information
src/xterm_perfcases
)xterm-benchmark some_files* -b
xterm-benchmark some_files* -e
The config file currently supports the following settings:
string
boolean
number
{[path: string]: value}
path
is a value path in the form <perf_case_path>#<summaryEntry_name>.<value_name>.<aggregate_name>
,
path supports simple matching rules (e.g. '*'
will match all values in all perf cases,
"*.median"
will match all median values in all perf cases).
value is an array in the form of [low_border, high_border]
, where the border values are relative
to the baseline value. Example: {"*.mean": [0.5, 2]}
- eval runs will pass all mean tests if they
are at least half and at most twice of the baseline valuestring[]
Perf cases are instances of a derived class of the base class PerfCase
.
To keep it highly customizable, PerfCase
can be extended by mixins (see src/example/custom_mixin.ts
).
The library comes with several predefined perf case classes:
A simple runtime reporting perf case would look like this:
import { RuntimeCase } from '..';
new RuntimeCase('Something to measure', async () => {
// some work
await new Promise(resolve => setTimeout(resolve, 1000));
})
.showRuntime() // show runtime for single run
.showAverageRuntime(); // show aggregated runtime for multiple runs
Perf cases can be put into a context that support running preparation and cleanup code with before
, beforeEach
, after
and afterEach
. A single file automatically contains a toplevel context.
import { before, after, beforeEach, afterEach, perfContext } from '..';
before(() => console.log('run once upon entering the file (always first)'));
after(() => console.log('run once upon leaving the file (always last)'));
beforeEach(() => console.log('run before each perf case or context'));
afterEach(() => console.log('run after each perf case or context'));
perfContext('some ctx', () => {
// perf cases or sub contexts...
});
// more perf cases or additional contexts...
-r
cmdline switch).RuntimeCase
)Throughput
mixin)ExtractFromTimeline
mixin):
mean
)median
)dev
)cv
)[low_border, high_border]
. The borders
are relative to the baseline value, currently it is not possible to set absolute values (might change).chrome-timeline
package, thus TimelinePerfCase
is not defined anymore.
If your perf cases rely on frontend performance testing with that type, either use an older version, or feel free to help upgrading chrome-timeline
to support newer browser engines as well.FAQs
A benchmark tool for measuring performance in xterm.js
The npm package xterm-benchmark receives a total of 140 weekly downloads. As such, xterm-benchmark popularity was classified as not popular.
We found that xterm-benchmark demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.