This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config: | |
target: "http://localhost:3000" | |
phases: | |
- duration: 30 | |
arrivalRate: 2 | |
name: Warm up | |
processor: "./processors/users.js" | |
payload: | |
- | |
path: "./payloads/secret.csv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Effect() | |
getAssetAllocation$ = this.action$ | |
.ofType(chart.LOAD_ASSET_ALLOCATION) | |
.switchMap(() => this.chartService.getAssetAllocation() | |
.map(data => new chart.AssetAllocationLoaded(data))); | |
@Effect() | |
getPerformance$ = this.action$ | |
.ofType(chart.LOAD_PERFORMANCE) | |
.switchMap(() => this.chartService.getPerformance() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function processFile(zipFile, outputPath) { | |
try { | |
const extractResult = await extract(zipFile, outputPath); | |
const writeToDb = await db.query(); | |
const addPointForUser = await db.query(); | |
} catch (err) { | |
// handle error here | |
return Promise.reject(); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var BaseClass = (function () { | |
var privateData = 6; | |
var controller = function () {}; | |
controller.prototype.getPrivateData = function () { | |
if (this.hasAccess) | |
return privateData; | |
else | |
throw new Error('No access'); | |
} |