Skip to content

Commit 579f7bb

Browse files
committed
Use "private" method naming convention
1 parent 89d6492 commit 579f7bb

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

data_rows/QueryHistory.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default class QueryHistory extends DataRow {
1616
constructor(databaseName, date) {
1717
super();
1818
this.QUERY_ID = uuid4();
19-
this.setQueryText();
19+
this._setQueryText();
2020
this.DATABASE_NAME = databaseName;
2121
const queryType = helpers.randomFromArray(this._getQueryTypes());
2222
this.QUERY_TYPE = queryType.type;
@@ -26,17 +26,17 @@ export default class QueryHistory extends DataRow {
2626
["BIG_WH", "X-Large"],
2727
["SMALL_WH", "Small"]
2828
]);
29-
this.setExecutionStatus();
29+
this._setExecutionStatus();
3030
this.START_TIME = date.toISOString();
3131
this.COMPILATION_TIME = Math.round(Math.random() * 1000);
32-
this.setExecutionTime(user.querySpeed, queryType.querySpeed);
32+
this._setExecutionTime(user.querySpeed, queryType.querySpeed);
3333
this.QUEUED_REPAIR_TIME = 0;
3434
this.QUEUED_OVERLOAD_TIME =
3535
Math.random() < 0.2 ? Math.round(Math.random() * 1000) : 0;
36-
this.setTransactionBlockedtime();
36+
this._setTransactionBlockedtime();
3737
}
3838

39-
setQueryText() {
39+
_setQueryText() {
4040
const queries = ["SHOW USERS", "SHOW WAREHOUSES", "SELECT foo FROM bar"];
4141
this.QUERY_TEXT = helpers.randomFromArray(queries);
4242
}
@@ -53,7 +53,7 @@ export default class QueryHistory extends DataRow {
5353
];
5454
}
5555

56-
setExecutionStatus() {
56+
_setExecutionStatus() {
5757
const statuses = [
5858
{ weight: 0.9, name: "SUCCESS" },
5959
{ weight: 0.31, name: "RUNNING" },
@@ -66,7 +66,7 @@ export default class QueryHistory extends DataRow {
6666
this.EXECUTION_STATUS = helpers.randomFromArrayByWeight(statuses);
6767
}
6868

69-
setExecutionTime(userQuerySpeed, queryTypeSpeed) {
69+
_setExecutionTime(userQuerySpeed, queryTypeSpeed) {
7070
const warehouseQuerySpeed = {
7171
BIG_WH: 0.5,
7272
SMALL_WH: 1.5
@@ -75,7 +75,7 @@ export default class QueryHistory extends DataRow {
7575
this.EXECUTION_TIME = Math.round(Math.random() * factor);
7676
}
7777

78-
setTransactionBlockedtime() {
78+
_setTransactionBlockedtime() {
7979
this.TRANSACTION_BLOCKED_TIME = 0;
8080
if (Math.random() < 0.05) {
8181
this.TRANSACTION_BLOCKED_TIME = Math.round(Math.random() * 1000);

data_rows/WarehouseMeteringHistory.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { randomFromArray } from "../helpers";
1010
export default class WarehouseMeteringHistory extends DataRow {
1111
constructor(date) {
1212
super();
13-
this.setStartAndEnd(date);
13+
this._setStartAndEnd(date);
1414
this.WAREHOUSE_NAME = randomFromArray(["BIG_WH", "SMALL_WH"]);
1515
this.CREDITS_USED = Math.random() * 100;
1616
if (this.WAREHOUSE_NAME == "SMALL_WH") {
@@ -19,7 +19,7 @@ export default class WarehouseMeteringHistory extends DataRow {
1919
this.CREDITS_USED.toFixed(2);
2020
}
2121

22-
setStartAndEnd(date) {
22+
_setStartAndEnd(date) {
2323
this.START_TIME = date.toISOString();
2424
const end = new Date(date);
2525
end.setHours(date.getHours() + 1);

0 commit comments

Comments
 (0)