@utsp/core 0.13.0-nightly.20251214151223.d6db2d9 → 0.13.0-nightly.20251214163808.a699d8b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -3647,6 +3647,14 @@ declare class User<TData = Record<string, any>> {
3647
3647
  private postProcessCommands;
3648
3648
  private currentPostProcessConfig;
3649
3649
  private bridgeMessages;
3650
+ private totalBytesSent;
3651
+ private totalBytesReceived;
3652
+ private bytesSentPerTick;
3653
+ private bytesReceivedPerTick;
3654
+ private bytesTickIndex;
3655
+ private bytesTickRate;
3656
+ private currentTickBytesSent;
3657
+ private currentTickBytesReceived;
3650
3658
  /**
3651
3659
  * Application-specific data storage
3652
3660
  * Use this to store game state, player data, or any custom information
@@ -4249,6 +4257,52 @@ declare class User<TData = Record<string, any>> {
4249
4257
  * ```
4250
4258
  */
4251
4259
  getStats(): UserStats;
4260
+ /**
4261
+ * Gets total bytes sent to this user (server-side)
4262
+ * Excludes bridge messages.
4263
+ */
4264
+ getTotalBytesSent(): number;
4265
+ /**
4266
+ * Gets total bytes received by this user (client-side)
4267
+ * Excludes bridge messages.
4268
+ */
4269
+ getTotalBytesReceived(): number;
4270
+ /**
4271
+ * Records bytes sent to this user (called by ServerRuntime)
4272
+ * @internal
4273
+ */
4274
+ recordBytesSent(bytes: number): void;
4275
+ /**
4276
+ * Records bytes received by this user (called by NetworkSync)
4277
+ * @internal
4278
+ */
4279
+ recordBytesReceived(bytes: number): void;
4280
+ /**
4281
+ * Resets byte counters (useful for periodic stats)
4282
+ */
4283
+ resetByteCounters(): void;
4284
+ /**
4285
+ * Sets the tick rate for bytes-per-second calculation
4286
+ * Call this when the runtime tick rate changes
4287
+ * @param tickRate - The tick rate in ticks per second
4288
+ */
4289
+ setBytesTickRate(tickRate: number): void;
4290
+ /**
4291
+ * Called at end of each tick to record bytes for this tick
4292
+ * Updates the sliding window for bytes/sec calculation
4293
+ * @internal
4294
+ */
4295
+ endTickBytes(): void;
4296
+ /**
4297
+ * Gets bytes sent per second (sliding window over last second)
4298
+ * @returns Bytes sent per second
4299
+ */
4300
+ getBytesSentPerSecond(): number;
4301
+ /**
4302
+ * Gets bytes received per second (sliding window over last second)
4303
+ * @returns Bytes received per second
4304
+ */
4305
+ getBytesReceivedPerSecond(): number;
4252
4306
  /**
4253
4307
  * Gets the bindingId of an axis from its name
4254
4308
  *