complexion-time-map

1.1.0 • Public • Published

Complexion Time Map

Want to see if your tokenizer can be tweaked? This library will provide profiling per time-map.

npm version Build Status Dependencies Dev Dependencies

What Does This Do?

It extends Complexion and gives you detailed timing about the methods being called for your tokenizer. This way one is able to more easily determine the slowest portions or what gets called the most so you can optimize code.

Usage

Install the code using npm, bower or possibly just clone the repository. Then, use the library in your JavaScript. There is UMD markup (via FidUmd) that should make this library available under any module system that you prefer to use.

Next, you add this between creating an instance of Complexion and where you add your tokens.

var Complexion = require('complexion');
var instance = new Complexion();
require('complexion-time-map')(instance);  // This is it
require('your-library-goes-here')(instance);
instance.tokenize(' ... your text ... ');
instance.timeMap.log();

For more information on what the timeMap property does, see the time-map project documentation.

Development

If you want to work on this library, you need to check out the repository and run npm install to get the dependencies.

Tests are always included. Make sure tests cover your changes. To run the current tests, just use npm test or grunt test (they will run the same test suite).

License

This software is licensed under an MIT license with an additional non-advertising clause.

Package Sidebar

Install

npm i complexion-time-map

Weekly Downloads

4

Version

1.1.0

License

MIT

Last publish

Collaborators

  • fidian