browserscale-ts 1.8.0 → 1.9.0

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.
@@ -1453,6 +1453,113 @@ export type GetPagesResponse = Message<"browserscale.v1.GetPagesResponse"> & {
1453
1453
  * Use `create(GetPagesResponseSchema)` to create a new message.
1454
1454
  */
1455
1455
  export declare const GetPagesResponseSchema: GenMessage<GetPagesResponse>;
1456
+ /**
1457
+ * What a session's browser has consumed since the session started: the CPU
1458
+ * time and memory of every process that rendered its pages — main frames,
1459
+ * cross-site iframes and the workers they host — including processes that have
1460
+ * since exited. Work done on the session's behalf in processes it shares with
1461
+ * other sessions is not included. The stop endpoint returns the same object, in
1462
+ * its JSON form, as the session's final usage.
1463
+ *
1464
+ * @generated from message browserscale.v1.SessionUsage
1465
+ */
1466
+ export type SessionUsage = Message<"browserscale.v1.SessionUsage"> & {
1467
+ /**
1468
+ * Real time since the session's browser was created, in seconds.
1469
+ *
1470
+ * @generated from field: double wall_time = 1;
1471
+ */
1472
+ wallTime: number;
1473
+ /**
1474
+ * CPU time in seconds, user plus kernel. Only time a thread actually ran on a
1475
+ * core counts; waiting and idling do not.
1476
+ *
1477
+ * @generated from field: double cpu_time = 2;
1478
+ */
1479
+ cpuTime: number;
1480
+ /**
1481
+ * The least memory the session held once its browser was ready, in bytes.
1482
+ * Sampled about once a second.
1483
+ *
1484
+ * @generated from field: double min_memory = 3;
1485
+ */
1486
+ minMemory: number;
1487
+ /**
1488
+ * The memory held, averaged over wall_time, in bytes; average_memory *
1489
+ * wall_time is the memory-time used. Sampled about once a second, so short
1490
+ * spikes count toward the peak but barely toward the average.
1491
+ *
1492
+ * @generated from field: double average_memory = 4;
1493
+ */
1494
+ averageMemory: number;
1495
+ /**
1496
+ * The most memory held at any one moment, in bytes.
1497
+ *
1498
+ * @generated from field: double peak_memory = 5;
1499
+ */
1500
+ peakMemory: number;
1501
+ /**
1502
+ * Renderer processes that hosted at least one of the session's frames: one
1503
+ * per site its pages and cross-site iframes needed.
1504
+ *
1505
+ * @generated from field: int32 renderers_used = 6;
1506
+ */
1507
+ renderersUsed: number;
1508
+ /**
1509
+ * Child frames created in the session's pages, whether or not they got a
1510
+ * process of their own.
1511
+ *
1512
+ * @generated from field: int32 frames_created = 7;
1513
+ */
1514
+ framesCreated: number;
1515
+ };
1516
+ /**
1517
+ * Describes the message browserscale.v1.SessionUsage.
1518
+ * Use `create(SessionUsageSchema)` to create a new message.
1519
+ */
1520
+ export declare const SessionUsageSchema: GenMessage<SessionUsage>;
1521
+ /**
1522
+ * @generated from message browserscale.v1.GetUsageRequest
1523
+ */
1524
+ export type GetUsageRequest = Message<"browserscale.v1.GetUsageRequest"> & {
1525
+ /**
1526
+ * @generated from field: string session_id = 1;
1527
+ */
1528
+ sessionId: string;
1529
+ /**
1530
+ * @generated from field: string api_key = 2;
1531
+ */
1532
+ apiKey: string;
1533
+ };
1534
+ /**
1535
+ * Describes the message browserscale.v1.GetUsageRequest.
1536
+ * Use `create(GetUsageRequestSchema)` to create a new message.
1537
+ */
1538
+ export declare const GetUsageRequestSchema: GenMessage<GetUsageRequest>;
1539
+ /**
1540
+ * @generated from message browserscale.v1.GetUsageResponse
1541
+ */
1542
+ export type GetUsageResponse = Message<"browserscale.v1.GetUsageResponse"> & {
1543
+ /**
1544
+ * @generated from field: browserscale.v1.SessionUsage usage = 1;
1545
+ */
1546
+ usage?: SessionUsage;
1547
+ /**
1548
+ * Always true today: this command has no semantic failure of its own.
1549
+ *
1550
+ * @generated from field: bool success = 2;
1551
+ */
1552
+ success: boolean;
1553
+ /**
1554
+ * @generated from field: optional browserscale.v1.CommandError error = 3;
1555
+ */
1556
+ error?: CommandError;
1557
+ };
1558
+ /**
1559
+ * Describes the message browserscale.v1.GetUsageResponse.
1560
+ * Use `create(GetUsageResponseSchema)` to create a new message.
1561
+ */
1562
+ export declare const GetUsageResponseSchema: GenMessage<GetUsageResponse>;
1456
1563
  /**
1457
1564
  * @generated from message browserscale.v1.NavigateRequest
1458
1565
  */
@@ -4641,6 +4748,17 @@ export declare const Browser: GenService<{
4641
4748
  input: typeof GetPagesRequestSchema;
4642
4749
  output: typeof GetPagesResponseSchema;
4643
4750
  };
4751
+ /**
4752
+ * What the session has consumed so far. The final figures need no call of
4753
+ * their own: the stop endpoint returns them.
4754
+ *
4755
+ * @generated from rpc browserscale.v1.Browser.GetUsage
4756
+ */
4757
+ getUsage: {
4758
+ methodKind: "unary";
4759
+ input: typeof GetUsageRequestSchema;
4760
+ output: typeof GetUsageResponseSchema;
4761
+ };
4644
4762
  /**
4645
4763
  * Page navigation / content
4646
4764
  *