UNPKG

visualise-elastic-profile

Version:

Visualise results from Profile API of ElasticSearch on the command line

57 lines 2.29 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.NestedProfile = exports.Profile = exports.Query = exports.QueryType = void 0; const Runtypes = __importStar(require("runtypes")); exports.QueryType = Runtypes.String; const BaseQueryRuntype = Runtypes.Record({ type: exports.QueryType, description: Runtypes.String, time_in_nanos: Runtypes.Number, breakdown: Runtypes.Dictionary(Runtypes.Number, Runtypes.String), }); exports.Query = Runtypes.Lazy(() => BaseQueryRuntype.And(Runtypes.Partial({ children: Runtypes.Array(exports.Query), }))); exports.Profile = Runtypes.Record({ shards: Runtypes.Array(Runtypes.Record({ id: Runtypes.String, searches: Runtypes.Array(Runtypes.Record({ query: Runtypes.Array(exports.Query), rewrite_time: Runtypes.Number, collector: Runtypes.Array(Runtypes.Record({ name: Runtypes.String, reason: Runtypes.String, time_in_nanos: Runtypes.Number, })), })), fetch: Runtypes.Record({ type: Runtypes.String, description: Runtypes.String, time_in_nanos: Runtypes.Number, breakdown: Runtypes.Dictionary(Runtypes.Number, Runtypes.String), }), })), }); exports.NestedProfile = Runtypes.Record({ profile: exports.Profile, }); //# sourceMappingURL=types.js.map