
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@q42/gpu-power-estimation
Advanced tools
Catering a 3d web-based experience to the power of a target platform is difficult with such a small amount of information available about the current graphics hardware. This utility aims to provide performance benchmark, clock speed, and memory informatio
Catering a 3d web-based experience to the power of a target platform is difficult with such a small amount of information available about the current graphics hardware. This utility aims to provide performance benchmark, clock speed, and memory information about the current hardware by guessing the type of graphics hardware using webgl UNMASKED_RENDERER_WEBGL
parameter and looking it up in a cached list of hardware.
GPU benchmark and spec information scraped from videocardbenchmark.net, techpowerup.com, and notebookcheck.net.
See your hardware info here!
Code in the /src
directory is licensed under the MIT license and free to use. Scraped graphics card data in the /data
directory is for demonstration purposes only and is subject to the terms of the respective source websites.
The values from UNMASKED_RENDERER_WEBGL
are irregular and relatively unpredictable. To find the corresponding hardware in the database list we
import { getDetailedInfo, getBasicInfo } from 'gpu-power-estimate';
fetch( './path/to/database.json' )
.then( res => res.json() )
.then( database => {
// get the hardware information
const canvas = document.createElement( 'canvas' );
const gl = canvas.getContext( 'webgl' );
const basicInfo = getBasicInfo( gl );
const detailedInfo = getDetailedInfo( database, gl );
// scale the application
const capability = detailedInfo ? detailedInfo.performance : 0;
if ( capability > 6000 ) {
// initialize highest fidelity scene
} else if ( capability > 3000 ) {
// initialize moderately complex scene
} else {
// initialize simplified scene
}
} );
getBasicInfo( context = null : WebGLContext ) : Object | null
Returns some basic info about the hardware based on the WEBGL_debug_renderer_info
extension or null
if it's unavailable.
If the context is not provided then a temporary one will be created.
{
// The full graphics hardware
name,
// A guess as to whether or not the hardware is integrated graphics
integrated,
// The raw unmasked fields returned from the extension
unmasked: { vendor, renderer }
}
getDetailedInfo(
database : Object,
contextOrCard = null : WebGLContext | string
) : Object | null
Returns more detailed hardware information based on the information in the provided database. The database is expected to be an object where the keys are the names of graphics hardware and the values are objects with detail information.
If a WebGL context or card name to search is not provided then a temporary context will be created.
The scraped example data provides the following information. Fields are null if unavailable. If no card is found or WEBGL_debug_renderer_info
is unavailable then null
is returned.
{
// Name of the GPU
name,
// Type of graphics card
// Workstation, Desktop, Mobile, Unknown
type,
// The 3d and 2d performance results as provided by the
// PassMark g3d and g2d benchmarks
performance,
// thermal design power
tdp,
// total available vram in MB
memory,
// clock speeds in MHz
clock,
memoryClock
}
For privacy reasons the availability of the UNMASKED_RENDERER_WEBGL
parameter may be disabled in which case no estimate can be provided.
Infomation on the WebGL debug extension
Blog with information about the extension and sampling of possible values
FAQs
Catering a 3d web-based experience to the power of a target platform is difficult with such a small amount of information available about the current graphics hardware. This utility aims to provide performance benchmark, clock speed, and memory informatio
We found that @q42/gpu-power-estimation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 18 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.