Move resource generation helper to a common place
This commit is contained in:
parent
eca7bf5ea2
commit
d7daf86067
|
@ -0,0 +1,22 @@
|
|||
export default function generateResources() {
|
||||
return {
|
||||
CpuStats: {
|
||||
Measured: ['Throttled Periods', 'Throttled Time', 'Percent'],
|
||||
Percent: 0.14159538847117795,
|
||||
SystemMode: 0,
|
||||
ThrottledPeriods: 0,
|
||||
ThrottledTime: 0,
|
||||
TotalTicks: 300.256693934837093,
|
||||
UserMode: 0,
|
||||
},
|
||||
MemoryStats: {
|
||||
Cache: 1744896,
|
||||
KernelMaxUsage: 0,
|
||||
KernelUsage: 0,
|
||||
MaxUsage: 4710400,
|
||||
Measured: ['RSS', 'Cache', 'Swap', 'Max Usage'],
|
||||
RSS: 1486848009,
|
||||
Swap: 0,
|
||||
},
|
||||
};
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
import { Factory } from 'ember-cli-mirage';
|
||||
import generateResources from '../data/generate-resources';
|
||||
|
||||
export default Factory.extend({
|
||||
resourceUsage: generateResources,
|
||||
|
@ -17,26 +18,3 @@ export default Factory.extend({
|
|||
return hash;
|
||||
},
|
||||
});
|
||||
|
||||
function generateResources() {
|
||||
return {
|
||||
CpuStats: {
|
||||
Measured: ['Throttled Periods', 'Throttled Time', 'Percent'],
|
||||
Percent: 0.14159538847117795,
|
||||
SystemMode: 0,
|
||||
ThrottledPeriods: 0,
|
||||
ThrottledTime: 0,
|
||||
TotalTicks: 3.256693934837093,
|
||||
UserMode: 0,
|
||||
},
|
||||
MemoryStats: {
|
||||
Cache: 1744896,
|
||||
KernelMaxUsage: 0,
|
||||
KernelUsage: 0,
|
||||
MaxUsage: 4710400,
|
||||
Measured: ['RSS', 'Cache', 'Swap', 'Max Usage'],
|
||||
RSS: 1486848,
|
||||
Swap: 0,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue