
Company News
Andrew Becherer Joins Socket as Chief Information Security Officer
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.
@nativescript/firebase-performance
Advanced tools
ns plugin add @nativescript/firebase-performance
Performance Monitoring allows you to gain insight into key performance characteristics within your application. It provides a simple API to track custom trace and HTTP request metrics
Review and analyze that data in the Firebase console. Performance Monitoring helps you to understand where and when the performance of your app can be improved so that you can use that information to fix performance issues.
Performance Monitoring package automatically traces events and metrics which are sent to Firebase. For more information on the automatic traces, please see the Firebase Performance Monitoring documentation. The package also allows you to performance monitor custom aspects to your application like network requests & task specific app code. All performance metrics are available on your Firebase console performance tab.
Below is how you would measure the amount of time it would take to complete a specific task in your app code.
import { firebase } from '@nativescript/firebase-core';
import '@nativescript/firebase-performance';
async function customTrace() {
// Define & start a trace
const trace = await firebase().perf().startTrace('custom_trace');
// Define trace meta details
trace.putAttribute('user', 'abcd');
trace.putMetric('credits', 30);
// Stop the trace
await trace.stop();
}
import { firebase } from '@nativescript/firebase-core';
import '@nativescript/firebase-performance';
async function getRequest(url) {
// Define the network metric
const metric = await firebase().perf().newHttpMetric(url, 'GET');
// Define meta details
metric.putAttribute('user', 'abcd');
// Start the metric
await metric.start();
// Perform a HTTP request and provide response information
const response = await fetch(url);
metric.setHttpResponseCode(response.statusCode);
metric.setResponseContentType(response.headers['Content-Type']);
metric.setResponsePayloadSize(response.headers['Content-Length']);
// Stop the metric
await metric.stop();
return response.toJSON();
}
// Call API
getRequest('https://api.com').then((json) => {
console.log(json);
});
Apache License Version 2.0
FAQs
NativeScript Firebase - Performancee
The npm package @nativescript/firebase-performance receives a total of 97 weekly downloads. As such, @nativescript/firebase-performance popularity was classified as not popular.
We found that @nativescript/firebase-performance demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 19 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.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.