UNPKG

artillery-performance-mcp-server

Version:

MCP server for performance testing with Artillery.io

1 lines 2.85 kB
const a8_0x1beb2d=a8_0x2bad;(function(_0x3de763,_0x106774){const _0x5f18a7=a8_0x2bad,_0x42d299=_0x3de763();while(!![]){try{const _0x5b24d7=-parseInt(_0x5f18a7(0xaf))/0x1+-parseInt(_0x5f18a7(0xbe))/0x2+parseInt(_0x5f18a7(0xbb))/0x3*(-parseInt(_0x5f18a7(0xbd))/0x4)+parseInt(_0x5f18a7(0xae))/0x5+parseInt(_0x5f18a7(0xb1))/0x6+parseInt(_0x5f18a7(0xb8))/0x7*(parseInt(_0x5f18a7(0xb4))/0x8)+parseInt(_0x5f18a7(0xb5))/0x9*(parseInt(_0x5f18a7(0xc0))/0xa);if(_0x5b24d7===_0x106774)break;else _0x42d299['push'](_0x42d299['shift']());}catch(_0x387fc2){_0x42d299['push'](_0x42d299['shift']());}}}(a8_0x4149,0xc7482));import a8_0x852213 from'fs';function a8_0x2bad(_0x84edaa,_0x4df93b){const _0x41496a=a8_0x4149();return a8_0x2bad=function(_0x2bad25,_0x3b8ac4){_0x2bad25=_0x2bad25-0xab;let _0x42c55d=_0x41496a[_0x2bad25];return _0x42c55d;},a8_0x2bad(_0x84edaa,_0x4df93b);}import a8_0x58c78a from'path';import{fileURLToPath}from'url';import a8_0x411897 from'./logger.js';import a8_0x2188ff from'handlebars';const __dirname=a8_0x58c78a[a8_0x1beb2d(0xb6)](fileURLToPath(import.meta['url'])),TEMPLATES_DIR=a8_0x58c78a[a8_0x1beb2d(0xb7)](__dirname,'../templates');export function readTemplate(_0x1a5a4c){const _0x5704c1=a8_0x1beb2d;try{const _0x37e780=a8_0x58c78a[_0x5704c1(0xb2)](TEMPLATES_DIR,_0x1a5a4c);return a8_0x852213[_0x5704c1(0xba)](_0x37e780,_0x5704c1(0xbf));}catch(_0xf53c99){a8_0x411897['error'](_0x5704c1(0xbc)+_0x1a5a4c+':\x20'+_0xf53c99);throw new Error('Failed\x20to\x20read\x20template:\x20'+_0x1a5a4c);}}export function writeFile(_0x56d7a0,_0x3fc5d8){const _0x426418=a8_0x1beb2d;try{const _0x55c76b=a8_0x58c78a[_0x426418(0xb6)](_0x56d7a0);!a8_0x852213['existsSync'](_0x55c76b)&&a8_0x852213[_0x426418(0xb9)](_0x55c76b,{'recursive':!![]}),a8_0x852213['writeFileSync'](_0x56d7a0,_0x3fc5d8,_0x426418(0xbf)),a8_0x411897[_0x426418(0xc1)](_0x426418(0xad)+_0x56d7a0);}catch(_0x27ab17){a8_0x411897[_0x426418(0xb0)](_0x426418(0xac)+_0x56d7a0+':\x20'+_0x27ab17);throw new Error('Failed\x20to\x20write\x20file:\x20'+_0x56d7a0);}}export function generateUniqueFilename(_0x59c667,_0x51f5c2=a8_0x1beb2d(0xab)){const _0x18e146=a8_0x1beb2d,_0x176773=new Date()['toISOString']()[_0x18e146(0xb3)](/[:.]/g,'-');return _0x59c667+'-'+_0x176773+'.'+_0x51f5c2;}export function processTemplate(_0x2c52d9,_0x56bd1b){const _0x25a702=a8_0x1beb2d,_0x4c2753=a8_0x2188ff[_0x25a702(0xc2)](_0x2c52d9);return _0x4c2753(_0x56bd1b);}function a8_0x4149(){const _0x442113=['info','compile','yml','Error\x20writing\x20file\x20','File\x20written\x20successfully:\x20','411420MtyQAG','177568GnVSTn','error','8495418LqncVL','join','replace','1472HPGjCG','297lnnTFC','dirname','resolve','31129pDVjqM','mkdirSync','readFileSync','2360463veArkB','Error\x20reading\x20template\x20','4CDdFMo','1737516DgoDtP','utf-8','100900bwQgWG'];a8_0x4149=function(){return _0x442113;};return a8_0x4149();}