taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

testing-get-performance-stats.rst (2365B)


      1 .. ts:op:: testingGetPerformanceStats
      2   :read-only:
      3 
      4   Get a list of performance stats for diagnostics.  Requires
      5   observability events to be enabled; performance tables for the
      6   current running wallet instance are generated from observability
      7   events and stored in memory.  Under each table, different types of
      8   duration for each operation (e.g. a ``getBalances`` wallet request)
      9   are included.
     10 
     11   **Request:**
     12 
     13     The request must be a `GetPerformanceStatsRequest` object.
     14 
     15   **Response:**
     16 
     17     On success, the result is a `GetPerformanceStatsResponse` object.
     18 
     19 .. ts:def:: GetPerformanceStatsRequest
     20 
     21   interface GetPerformanceStatsRequest {
     22     // Limit to N largest average performance stats of each table.
     23     // When undefined, all performance stats will be returned.
     24     limit?: number;
     25   }
     26 
     27 .. ts:def:: GetPerformanceStatsResponse
     28 
     29   interface GetPerformanceStatsResponse {
     30     stats: PerformanceTable;
     31   }
     32 
     33 .. ts:def:: PerformanceTable
     34 
     35   type PerformanceTable = {
     36     [key in PerformanceStatType]?: PerformanceStat[];
     37   };
     38 
     39 .. ts:def:: PerformanceStatType
     40 
     41   type PerformanceStatType =
     42     | "http-fetch"
     43     | "db-query"
     44     | "crypto"
     45     | "wallet-request"
     46     | "wallet-task";
     47 
     48 .. ts:def:: PerformanceStat
     49 
     50   type PerformanceStat =
     51     | {
     52         type: "http-fetch";
     53         url: string;
     54         avgDurationMs: number;
     55         maxDurationMs: number;
     56         minDurationMs: number;
     57         totalDurationMs: number;
     58         count: number;
     59       }
     60     | {
     61         type: "db-query";
     62         name: string;
     63         location: string;
     64         avgDurationMs: number;
     65         maxDurationMs: number;
     66         minDurationMs: number;
     67         totalDurationMs: number;
     68         count: number;
     69       }
     70     | {
     71         type: "crypto";
     72         operation: string;
     73         avgDurationMs: number;
     74         maxDurationMs: number;
     75         minDurationMs: number;
     76         totalDurationMs: number;
     77         count: number;
     78       }
     79     | {
     80         type: "wallet-request";
     81         operation: string;
     82         avgDurationMs: number;
     83         maxDurationMs: number;
     84         minDurationMs: number;
     85         totalDurationMs: number;
     86         count: number;
     87       }
     88     | {
     89         type: "wallet-task";
     90         taskId: string;
     91         avgDurationMs: number;
     92         maxDurationMs: number;
     93         minDurationMs: number;
     94         totalDurationMs: number;
     95         count: number;
     96       };