Skip to content

Commit

Permalink
fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydaly committed Aug 20, 2018
1 parent c96c6c8 commit ee130d1
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions lib/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* Lightweight web framework for your serverless applications
* @author Jeremy Daly <jeremy@jeremydaly.com>
* @license MIT
*/
*/

// IDEA: add unique function identifier
// IDEA: response length
// https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference
// IDEA: add unique function identifier
// IDEA: response length
// https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference

const UTILS = require('./utils') // Require utils library

Expand Down Expand Up @@ -64,7 +64,7 @@ exports.config = (config,levels) => {
qs: Object.keys(req.query).length > 0 ? req.query : undefined
}
},
res: res => {
res: () => {
return { }
},
context: context => {
Expand Down Expand Up @@ -92,7 +92,7 @@ exports.config = (config,levels) => {
let _context = Object.assign({},defaults.context(context),serializers.context(context))
let _custom = typeof custom === 'object' && !Array.isArray(custom) ?
Object.assign({},defaults.custom(custom),serializers.custom(custom)) :
defaults.custom(custom)
defaults.custom(custom)

return Object.assign({},
{
Expand Down Expand Up @@ -198,14 +198,14 @@ exports.sampler = (app,req) => {
// Enable sampling if last sample is passed target split
} else if (rule.target > 0 &&
counts.start+Math.floor(rule.period*1000/rule.target*counts.fCount) < now) {
level = rule.level
counts.fCount++
// console.log('\n*********** FIXED ***********');
level = rule.level
counts.fCount++
// console.log('\n*********** FIXED ***********');
} else if (rule.rate > 0 &&
counts.start+Math.floor(velocity*counts.pCount+velocity/2) < now) {
level = rule.level
counts.pCount++
// console.log('\n*********** RATE ***********');
level = rule.level
counts.pCount++
// console.log('\n*********** RATE ***********');
}

// Increment total count
Expand Down

0 comments on commit ee130d1

Please sign in to comment.