Benchmark.js
by rdillman
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<ul id='cycleResults'>
</ul>
<div id="result">
</div>
<br>
<button id="btn">
Run Tests
</button>
JavaScript
var props = { story: { status: { StoryStatus: "COMPLETED" } } };
function getStatusSwitch(props) {
var color;
var icon;
var label = "";
var width = 16;
switch (props.story.status.StoryStatus) {
case "NOT_INVITED": {
color = "silver";
icon = "IconNotInvitedBrandBuilderShape";
label = "Not invited";
width = 9;
break;
}
case "PENDING": {
color = "yellow";
icon = "IconPendingShape";
label = "Pending Email";
break;
}
case "HARD_BOUNCED": {
color = "orange";
icon = "IconEmailBounces";
label = "Email hard bounced";
break;
}
case "SOFT_BOUNCED": {
color = "orange";
icon = "IconEmailBounces";
label = "Email soft bounced";
break;
}
case "RECEICED": {
color = "muse-blue";
icon = "IconEmailReceivedShape";
label = "Email Received";
break;
}
case "IN_PROGRESS": {
color = "royal-blue";
icon = "IconInProgressCircle";
label = "Tool in progress";
break;
}
case "COMPLETED": {
color = "green";
icon = "IconCheckCircle";
label = "Tool completed";
break;
}
}
return color;
};
function getStatusMap(props) {
var IconProps = {
no_invited: {
color: "silver",
icon: "IconNotInvitedBrandBuilderShape",
label: "Not invited",
width: 9
},
pending: {
color: "yellow",
icon: "IconPendingShape",
label: "Pending Email",
width: 16,
},
hard_bounced: {
color: "orange",
icon: "IconEmailBounces",
label: "Email hard bounced",
width: 16,
...