-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #867 from terascope/beam-me-up
v0.43.0: Add native support for the new Job APIs in teraslice
- Loading branch information
Showing
157 changed files
with
3,326 additions
and
1,971 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
'use strict'; | ||
|
||
const { Suite } = require('./helpers'); | ||
const FakeDataEntity = require('./fixtures/fake-data-entity'); | ||
const { DataEntity } = require('../dist'); | ||
|
||
const data = {}; | ||
|
||
for (let i = 0; i < 100; i++) { | ||
data[`str-${i}`] = `data-${i}`; | ||
data[`int-${i}`] = i; | ||
} | ||
|
||
const metadata = { id: Math.random() * 1000 * 1000 }; | ||
|
||
module.exports = () => Suite('DataEntity (large records)') | ||
.add('new data', { | ||
fn() { | ||
let entity = Object.assign({}, data); | ||
entity.metadata = Object.assign({ createdAt: Date.now() }); | ||
entity = null; | ||
return entity; | ||
} | ||
}) | ||
.add('new data with metadata', { | ||
fn() { | ||
let entity = Object.assign({}, data); | ||
entity.metadata = Object.assign({}, metadata, { createdAt: Date.now() }); | ||
entity = null; | ||
return entity; | ||
} | ||
}) | ||
.add('new FakeDataEntity', { | ||
fn() { | ||
let entity = new FakeDataEntity(data); | ||
entity = null; | ||
return entity; | ||
} | ||
}) | ||
.add('new FakeDataEntity metadata', { | ||
fn() { | ||
let entity = new FakeDataEntity(data, metadata); | ||
entity = null; | ||
return entity; | ||
} | ||
}) | ||
.add('new DataEntity', { | ||
fn() { | ||
let entity = new DataEntity(data); | ||
entity = null; | ||
return entity; | ||
} | ||
}) | ||
.add('new DataEntity with metadata', { | ||
fn() { | ||
let entity = new DataEntity(data, metadata); | ||
entity = null; | ||
return entity; | ||
} | ||
}) | ||
.add('DataEntity.make', { | ||
fn() { | ||
let entity = DataEntity.make(data); | ||
entity = null; | ||
return entity; | ||
} | ||
}) | ||
.add('DataEntity.make with metadata', { | ||
fn() { | ||
let entity = DataEntity.make(data, metadata); | ||
entity = null; | ||
return entity; | ||
} | ||
}) | ||
.run({ | ||
async: true, | ||
initCount: 2, | ||
maxTime: 5, | ||
}); |
Oops, something went wrong.