faast.js

faast.js

  • Docs
  • API
  • Community
  • GitHub
  • Blog

faastjs > FaastModule > on

FaastModule.on() method

Register a callback for statistics events.

Signature:

on(name: "stats", listener: (statsEvent: FunctionStatsEvent) => void): void;

Parameters

Parameter

Type

Description

name

"stats"

listener

(statsEvent: FunctionStatsEvent) => void

**Returns:**

void

Remarks

The callback is invoked once for each cloud function that was invoked within the last 1s interval, with a FunctionStatsEvent summarizing the statistics for each function. Typical usage:

faastModule.on("stats", console.log);
  • FaastModule.on() method
  • Parameters
  • Remarks
faast.js
Docs
IntroductionAPI ReferenceContributingExamples
Community
DiscordTwitterStack Overflowfaast.js
More
BlogUser Showcase
Copyright © 2025 Andy Chou