{"_id":"@dlukanin/ts-graphite-decorator","_rev":"2-43e618db029ec1103e61f650c898cc89","name":"@dlukanin/ts-graphite-decorator","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@dlukanin/ts-graphite-decorator","version":"1.0.0","description":"Some expiremental ts decorators for graphite powered by graphite package","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","lint":"eslint src/ --ext .js,.jsx,.ts,.tsx"},"repository":{"type":"git","url":"git+https://github.com/dlukanin/ts-graphite-decorator.git"},"keywords":["typescript","graphite","decorator"],"author":{"name":"dylukanin@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/dlukanin/ts-graphite-decorator/issues"},"homepage":"https://github.com/dlukanin/ts-graphite-decorator#readme","dependencies":{"graphite":"0.1.4","performance-now":"^2.1.0"},"devDependencies":{"@types/graphite":"^0.1.0","@types/node":"^10.17.28","typescript":"^4.0.2"},"publishConfig":{"access":"public"},"gitHead":"caa53cdf102a35eb6fe7062b9317fbfb6ed6a7f2","_id":"@dlukanin/ts-graphite-decorator@1.0.0","_nodeVersion":"10.22.0","_npmVersion":"6.14.6","dist":{"integrity":"sha512-0NgTuh6eF8gm7KuYDktTvMPvewOnifE+8/ag+CprxhrOKLvQwJX+Pn4q+IB6f4EvUHkAHu+FCiUVC6ZiNcZwFA==","shasum":"c37ff8725e6cc34a7c38274990757cc4ab6a6efb","tarball":"https://registry.npmjs.org/@dlukanin/ts-graphite-decorator/-/ts-graphite-decorator-1.0.0.tgz","fileCount":17,"unpackedSize":13663,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQQD9CRA9TVsSAnZWagAA2HQQAJsCPkucH4+ej5r/lRxG\naGys9jkc4SWBLenn6h5vSKHx3B8MUL95AbweZWCVq91qVzCaFAms48sMpp8L\ntsFr4KNmL2s8sa5pOH0KhFRYtRS2ejZZqAPxq/WyZKEjQ8XY//oUkNCz/Mxx\nAH2v59e1wbg6Eu8Zn/wMcEMHnBKFUbBF631mx1Su4nanfidTIoMUm8oNEsNA\ngm1gDsXvdJErq4tOoFTvnUgu4BLxWZD1ZZaBjHOEDk38H+eqE2NN+wZ1miFN\nQhniTKZZWd3Olmydw87UjPo2x2hFcNUDPlE8u9dA+r6ZNMSwJ+MdiWaLslpr\nMWdCWmLcIpWGa0ye4Ozaz/0LNG/tIuEhhps8MP5vnaq5EQHdAMtJDfvzGEEb\n6Q2MaQwgv0hXMxRsuLckzGslqy/4p9ryrzinz1Wd1vKOkJ0SublHzzu8XCFJ\n3EWyNVlgPuYPXrVAOSeAekH31BTQeOgYYvf0ZlJZ90j2UgKDRix3ev+lPVGQ\nY6TUzOMXwfnpcNeOmZRC3ojOLl0s0G0ET00EEEVtr4ZuQewCNM+ECMyYx0Dt\nzDf4YyrnEe6bC+eY9e+Kz1qvcWj1hPZRXcy2ElJuvclPeQFWG4MWHfvGc0hs\nG7HFRrSFCPwrIoZoBHi7hH+4Sfe9xd5EOIyyX18RA2W9Oqui3xNVbus70UBv\nAoQy\r\n=Po1j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6TGORUZXT4HOK63NNFBpL5X24H6pyShHiTLWfnBMiyAIhAKFed3Th+aBOI3FDZ1sFPAueMZUoUAyIo4gILgJXrOt1"}]},"maintainers":[{"name":"dlukanin","email":"dylukanin@gmail.com"}],"_npmUser":{"name":"dlukanin","email":"dylukanin@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-graphite-decorator_1.0.0_1598095612816_0.5954198981529348"},"_hasShrinkwrap":false},"1.0.1":{"name":"@dlukanin/ts-graphite-decorator","version":"1.0.1","description":"Some expiremental ts decorators for graphite powered by graphite package","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","lint":"eslint src/ --ext .js,.jsx,.ts,.tsx"},"repository":{"type":"git","url":"git+https://github.com/dlukanin/ts-graphite-decorator.git"},"keywords":["typescript","graphite","decorator"],"author":{"name":"dylukanin@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/dlukanin/ts-graphite-decorator/issues"},"homepage":"https://github.com/dlukanin/ts-graphite-decorator#readme","dependencies":{"graphite":"0.1.4","performance-now":"^2.1.0"},"devDependencies":{"@types/graphite":"^0.1.0","@types/node":"^12.20.23","typescript":"^4.4.2"},"publishConfig":{"access":"public"},"gitHead":"4da6564b469e3424e9e93c107ce40110e4b43c7b","_id":"@dlukanin/ts-graphite-decorator@1.0.1","_nodeVersion":"12.22.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-LustuyAq4KiOfw6dXYoyosDxdvWcWzi5Hr1RUL71okV2Jsb0cbGwVT9JbxvslFHhcpnZhoTrSlfVn61HP7d5TQ==","shasum":"89aef28b76c6176f838366bad647dd31baff187c","tarball":"https://registry.npmjs.org/@dlukanin/ts-graphite-decorator/-/ts-graphite-decorator-1.0.1.tgz","fileCount":17,"unpackedSize":13746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhNJMVCRA9TVsSAnZWagAAGHgP/22wOhi+3+JKEMrUlbA4\nQ0RBMXu7pXGeofaCIUCCq5OZ0PuxBZNXkX8dgpAo/QjeJh48Mk/ViYQx1i8F\n8NpLOzWWAGiroBlvZG9T9gxXvLHLsC9EjgVUvJOrulUqz2KWBWHdZeyMeOYr\n/S60338t3Jkj5yYvsPvjtQO0XVg7DsYGfItLRcZBLOIxIkC0vn3BWC3O+jM4\nQWO6Ab0P2Ks+G3qjPNJnQAS0QYh9X9kBW/w/kcBWNPTC++3EmjffX7TG3huh\nDKCiXxEdfKABRpeVx7ZgHHIhjMXcr6VAwmMFv27SyqKjRM29vhHk/j6Mnly3\nPSk6T1XW/DiTfJ6Cn9pz0DEAbZZllywPHcrZwXqYBQgIvgy+HxDewZ350Xb1\nGROZKP5fMCpuy3m5YTavGvvvq3fE+3/4Vf8zkPRkixNl0WEJArhPRDwKzAhS\njh6+XM0ONC0wAGi9eCEAT16iAKpyMhn48VBSwxlkN8oNEYY1TRgBOjudrg3p\nJSwoo47rHmIH4KSCPqSIa96xfXE47TXGuTwcLFxvhTREdsEN216M/I/zCiE/\nJMjn+U/Su8bLfS8UdNPULdV8zO7ycwQh/3bFwhVR6TRQ/5jss5MkDW4QWJKr\n78HTC/qlE1RTxT86g8YZtYdC3DHXmWaF/7NngjtlDxJ2TQ1CmUvlgVYGhSOy\ndGNT\r\n=2nmZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIET2UG5s7A5VXuylyN25J0EcRXZ1VY+Qe8JoSFuL4o7UAiEAtLh9vj48QJ9+H+nj4kwKbJXCoW+ZUPpwq8MFf/ZmW40="}]},"_npmUser":{"name":"dlukanin","email":"dylukanin@gmail.com"},"directories":{},"maintainers":[{"name":"dlukanin","email":"dylukanin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-graphite-decorator_1.0.1_1630835477578_0.028519958456642902"},"_hasShrinkwrap":false}},"time":{"created":"2020-08-22T11:26:52.776Z","1.0.0":"2020-08-22T11:26:53.001Z","modified":"2022-04-05T04:57:32.187Z","1.0.1":"2021-09-05T09:51:17.710Z"},"maintainers":[{"name":"dlukanin","email":"dylukanin@gmail.com"}],"description":"Some expiremental ts decorators for graphite powered by graphite package","homepage":"https://github.com/dlukanin/ts-graphite-decorator#readme","keywords":["typescript","graphite","decorator"],"repository":{"type":"git","url":"git+https://github.com/dlukanin/ts-graphite-decorator.git"},"author":{"name":"dylukanin@gmail.com"},"bugs":{"url":"https://github.com/dlukanin/ts-graphite-decorator/issues"},"license":"MIT","readme":"# ts-graphite-decorator\n\n\n```\nnpm i @dlukanin/ts-graphite-decorator\n```\n\nSimple decorator collection for using it with [graphite](https://www.npmjs.com/package/graphite) package.\n\nDecorators are written using **current typescript decorators implementation** and\nyou can easy integrate them in your typescript code.\n\nYou can get more info about typescript decorators on the [official typescript docs site](https://www.typescriptlang.org/docs/handbook/decorators.html).\n\nNote that you should open graphite connection using graphite module (or it's own custom implementation) in your own code.\n\n## Changelog\n1.0.0 - Deps up. Error report enable.\n\n0.0.7 - Now you can pass graphite connection string in decorator w/o client.\n\n0.0.5, 0.0.6 - Some bugfixes\n\n0.0.4 - Added logging interval - 60 sec (TODO - configure it)\n\n0.0.2 & 0.0.3 - Some inner module fixes.\n\n0.0.1 - Hello world! First version with Metered decorator.\n\n## Usage\n\n```typescript\nimport {Metered} from 'ts-graphite-decorator';\nimport * as graphite from 'graphite';\n\nconst client = graphite.createClient('plaintext://your-graphite-url:2003');\n\nclass Test {\n    @Metered('some.test.key', client)\n    public meteredExample() {\n        console.log('started method');\n        for (let i = 0; i <= 100; i++) {\n            let foo = i + Math.random();\n        }\n\n        console.log('ended method');\n\n        return true;\n    }\n}\n\nconst test = new Test();\ntest.meteredExample(); // graphite got some info about your method exec time\n\n```\n\n```typescript\nimport {Metered} from 'ts-graphite-decorator';\nimport * as graphite from 'graphite';\n\nconst client = graphite.createClient('plaintext://your-graphite-url:2003');\n\nclass Test {\n    @RPM('key', client)\n    public rpmExample() {\n        console.log('started method');\n        for (let i = 0; i <= 100; i++) {\n            let foo = i + Math.random();\n        }\n\n        console.log('ended method');\n\n        return true;\n    }\n}\n\nconst test = new Test();\ntest.rpmExample(); // graphite will get info about 1 rpm/min\n\n```\n\nOr\n\n```typescript\nimport {Metered} from 'ts-graphite-decorator';\n\nclass Test {\n    @RPM('key', 'plaintext://your-graphite-url:2003')\n    public rpmExample() {\n        console.log('started method');\n        for (let i = 0; i <= 100; i++) {\n            let foo = i + Math.random();\n        }\n\n        console.log('ended method');\n\n        return true;\n    }\n}\n\nconst test = new Test();\ntest.rpmExample(); // graphite will get info about 1 rpm/min\n\n```\n\nCheck out the examples folder: https://github.com/dlukanin/ts-graphite-decorator/tree/master/examples\n\n## License\n\nMIT https://github.com/dlukanin/ts-graphite-decorator/blob/master/LICENSE","readmeFilename":"README.md"}