Skip to content

Commit 209ffcf

Browse files
authored
Fix olap_workload (#12849)
1 parent c5f46f3 commit 209ffcf

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

ydb/tools/olap_workload/__main__.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,7 @@ def drop_all_columns(self, table_name):
149149
if c.name != "id":
150150
self.drop_column(table_name, c.name)
151151

152-
def queries_while_alter(self):
153-
table_name = "queries_while_alter"
152+
def queries_while_alter(self, table_name):
154153

155154
schema = self.list_columns(table_name)
156155

@@ -174,14 +173,11 @@ def run(self):
174173

175174
while time.time() - started_at < self.duration:
176175
try:
177-
self.create_table("queries_while_alter")
178-
176+
# TODO: drop only created tables by current workload
179177
self.drop_all_tables()
180-
181-
self.queries_while_alter()
182-
183178
table_name = table_name_with_timestamp()
184179
self.create_table(table_name)
180+
self.queries_while_alter(table_name)
185181
except Exception as e:
186182
print(type(e), e)
187183

@@ -192,7 +188,7 @@ def run(self):
192188
)
193189
parser.add_argument('--endpoint', default='localhost:2135', help="An endpoint to be used")
194190
parser.add_argument('--database', default=None, required=True, help='A database to connect')
195-
parser.add_argument('--duration', default=120, type=lambda x: int(x), help='A duration of workload in seconds.')
191+
parser.add_argument('--duration', default=10 ** 9, type=lambda x: int(x), help='A duration of workload in seconds.')
196192
parser.add_argument('--batch_size', default=1000, help='Batch size for bulk insert')
197193
args = parser.parse_args()
198194
with Workload(args.endpoint, args.database, args.duration, args.batch_size) as workload:

0 commit comments

Comments
 (0)