Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timothygu/workshopper-timer
A utility to test the execution time of the submission against the solution in a workshopper
https://github.com/timothygu/workshopper-timer
Last synced: 11 days ago
JSON representation
A utility to test the execution time of the submission against the solution in a workshopper
- Host: GitHub
- URL: https://github.com/timothygu/workshopper-timer
- Owner: TimothyGu
- License: mit
- Created: 2016-01-19T18:20:06.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-19T18:32:27.000Z (almost 9 years ago)
- Last Synced: 2024-12-20T15:14:25.408Z (22 days ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# workshopper-timer
Makes sure the submission of a workshop executes for around the same duration
as the solution.[![Dependency Status](https://img.shields.io/david/TimothyGu/workshopper-timer.svg)](https://david-dm.org/TimothyGu/workshopper-timer)
[![NPM version](https://img.shields.io/npm/v/workshopper-timer.svg)](https://www.npmjs.org/package/workshopper-timer)## Installation
npm install --save workshopper-timer
## Usage
```js
var exercise = require('workshopper-exercise')();
var filecheck = require('workshopper-exercise/filecheck');
var execute = require('workshopper-exercise/execute');
var comparestdout = require('workshopper-exercise/comparestdout');var timer = require('workshopper-timer');
exercise = filecheck(exercise);
exercise = execute(exercise);
exercise = comparestdout(exercise);// 100 = threshold in ms
exercise = timer(exercise, 100);module.exports = exercise;
```## License
MIT