[jira] [Comment Edited] (CASSANDRA-18861) add time elapsed for simple CQL statement in the cql shell
[ https://issues.apache.org/jira/browse/CASSANDRA-18861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17768025#comment-17768025 ] Stefan Miklosovic edited comment on CASSANDRA-18861 at 9/22/23 1:57 PM: {code} 15:52 $ ./bin/cqlsh Connected to Test Cluster at 127.0.0.1:9042 [cqlsh 6.2.0 | Cassandra 5.1-SNAPSHOT | CQL spec 3.4.7 | Native protocol v5] Use HELP for help. cqlsh> ELAPSED Displaying elapsed time for each CQL query is currently disabled. Use ELAPSED ON to enable. cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) cqlsh> ELAPSED ON Now Displaying elapsed time for each CQL query is enabled cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) (1ms elapsed) cqlsh> ELAPSED OFF Disabled Displaying elapsed time for each CQL query. cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) cqlsh> ELAPSED ON Now Displaying elapsed time for each CQL query is enabled cqlsh> CREATE KEYSPACE myks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; (53ms elapsed) cqlsh> DROP KEYSPACE myks ; (316ms elapsed) cqlsh> {code} I added ELAPSED ON / OFF command. https://github.com/instaclustr/cassandra/commit/d2d8bad393201536818dacb864b64cc0093203ca [~maoling] is this OK for you? I would also wait for CASSANDRA-18547 Switches will get more love there and this will just go on top. cc [~bschoeni] was (Author: smiklosovic): {code} 15:52 $ ./bin/cqlsh Connected to Test Cluster at 127.0.0.1:9042 [cqlsh 6.2.0 | Cassandra 5.1-SNAPSHOT | CQL spec 3.4.7 | Native protocol v5] Use HELP for help. cqlsh> ELAPSED Displaying elapsed time for each CQL query is currently disabled. Use ELAPSED ON to enable. cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) cqlsh> ELAPSED ON Now Displaying elapsed time for each CQL query is enabled cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) (1ms elapsed) cqlsh> ELAPSED OFF Disabled Displaying elapsed time for each CQL query. cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) cqlsh> ELAPSED ON Now Displaying elapsed time for each CQL query is enabled cqlsh> CREATE KEYSPACE myks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; (53ms elapsed) cqlsh> DROP KEYSPACE myks ; (316ms elapsed) cqlsh> {code} I added EXPAND ON / OFF command. https://github.com/instaclustr/cassandra/commit/d2d8bad393201536818dacb864b64cc0093203ca [~maoling] is this OK for you? I would also wait for CASSANDRA-18547 Switches will get more love there and this will just go on top. cc [~bschoeni] > add time elapsed for simple CQL statement in the cql shell > -- > > Key: CASSANDRA-18861 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18861 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Semantics >Reporter: Ling Mao >Assignee: Ling Mao >Priority: Low > Fix For: 5.x > > -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-18861) add time elapsed for simple CQL statement in the cql shell
[ https://issues.apache.org/jira/browse/CASSANDRA-18861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17768025#comment-17768025 ] Stefan Miklosovic edited comment on CASSANDRA-18861 at 9/22/23 1:57 PM: {code} 15:52 $ ./bin/cqlsh Connected to Test Cluster at 127.0.0.1:9042 [cqlsh 6.2.0 | Cassandra 5.1-SNAPSHOT | CQL spec 3.4.7 | Native protocol v5] Use HELP for help. cqlsh> ELAPSED Displaying elapsed time for each CQL query is currently disabled. Use ELAPSED ON to enable. cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) cqlsh> ELAPSED ON Now Displaying elapsed time for each CQL query is enabled cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) (1ms elapsed) cqlsh> ELAPSED OFF Disabled Displaying elapsed time for each CQL query. cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) cqlsh> ELAPSED ON Now Displaying elapsed time for each CQL query is enabled cqlsh> CREATE KEYSPACE myks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; (53ms elapsed) cqlsh> DROP KEYSPACE myks ; (316ms elapsed) cqlsh> {code} I added EXPAND ON / OFF command. https://github.com/instaclustr/cassandra/commit/d2d8bad393201536818dacb864b64cc0093203ca [~maoling] is this OK for you? I would also wait for CASSANDRA-18547 Switches will get more love there and this will just go on top. cc [~bschoeni] was (Author: smiklosovic): {code} 15:52 $ ./bin/cqlsh Connected to Test Cluster at 127.0.0.1:9042 [cqlsh 6.2.0 | Cassandra 5.1-SNAPSHOT | CQL spec 3.4.7 | Native protocol v5] Use HELP for help. cqlsh> ELAPSED Displaying elapsed time for each CQL query is currently disabled. Use ELAPSED ON to enable. cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) cqlsh> ELAPSED ON Now Displaying elapsed time for each CQL query is enabled cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) (1ms elapsed) cqlsh> ELAPSED OFF Disabled Displaying elapsed time for each CQL query. cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) cqlsh> ELAPSED ON Now Displaying elapsed time for each CQL query is enabled cqlsh> CREATE KEYSPACE myks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; (53ms elapsed) cqlsh> DROP KEYSPACE myks ; (316ms elapsed) cqlsh> {code} I added EXPAND ON / OFF command. https://github.com/instaclustr/cassandra/commit/d2d8bad393201536818dacb864b64cc0093203ca [~maoling] is this OK for you? I would also wait for CASSANDRA-18547 Switches will get more love there and this will just go on top. > add time elapsed for simple CQL statement in the cql shell > -- > > Key: CASSANDRA-18861 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18861 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Semantics >Reporter: Ling Mao >Assignee: Ling Mao >Priority: Low > Fix For: 5.x > > -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-18861) add time elapsed for simple CQL statement in the cql shell
[ https://issues.apache.org/jira/browse/CASSANDRA-18861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17768025#comment-17768025 ] Stefan Miklosovic edited comment on CASSANDRA-18861 at 9/22/23 1:56 PM: {code} 15:52 $ ./bin/cqlsh Connected to Test Cluster at 127.0.0.1:9042 [cqlsh 6.2.0 | Cassandra 5.1-SNAPSHOT | CQL spec 3.4.7 | Native protocol v5] Use HELP for help. cqlsh> ELAPSED Displaying elapsed time for each CQL query is currently disabled. Use ELAPSED ON to enable. cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) cqlsh> ELAPSED ON Now Displaying elapsed time for each CQL query is enabled cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) (1ms elapsed) cqlsh> ELAPSED OFF Disabled Displaying elapsed time for each CQL query. cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) cqlsh> ELAPSED ON Now Displaying elapsed time for each CQL query is enabled cqlsh> CREATE KEYSPACE myks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; (53ms elapsed) cqlsh> DROP KEYSPACE myks ; (316ms elapsed) cqlsh> {code} I added EXPAND ON / OFF command. https://github.com/instaclustr/cassandra/commit/d2d8bad393201536818dacb864b64cc0093203ca [~maoling] is this OK for you? I would also wait for CASSANDRA-18547 Switches will get more love there and this will just go on top. was (Author: smiklosovic): {code} 15:52 $ ./bin/cqlsh Connected to Test Cluster at 127.0.0.1:9042 [cqlsh 6.2.0 | Cassandra 5.1-SNAPSHOT | CQL spec 3.4.7 | Native protocol v5] Use HELP for help. cqlsh> ELAPSED Displaying elapsed time for each CQL query is currently disabled. Use ELAPSED ON to enable. cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) cqlsh> ELAPSED ON Now Displaying elapsed time for each CQL query is enabled cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) (1ms elapsed) cqlsh> ELAPSED OFF Disabled Displaying elapsed time for each CQL query. cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) cqlsh> ELAPSED ON Now Displaying elapsed time for each CQL query is enabled cqlsh> CREATE KEYSPACE myks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; (53ms elapsed) cqlsh> DROP KEYSPACE myks ; (316ms elapsed) cqlsh> {code} I added EXPAND ON / OFF command. https://github.com/instaclustr/cassandra/commit/d2d8bad393201536818dacb864b64cc0093203ca [~maoling] is this OK for you? > add time elapsed for simple CQL statement in the cql shell > -- > > Key: CASSANDRA-18861 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18861 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Semantics >Reporter: Ling Mao >Assignee: Ling Mao >Priority: Low > Fix For: 5.x > > -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-18861) add time elapsed for simple CQL statement in the cql shell
[ https://issues.apache.org/jira/browse/CASSANDRA-18861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17767906#comment-17767906 ] Stefan Miklosovic edited comment on CASSANDRA-18861 at 9/22/23 9:11 AM: This patch prints elapsed times to everything (1) when --debug is specified with cqlsh: {code:java} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; (3ms elapsed) cassandra@cqlsh> DROP KEYSPACE ks2 ; (525ms elapsed) cassandra@cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) (4ms elapsed) {code} I would personally hide this behind a flag in cqlshrc file. It could be also activated automatically if cqlsh is executed with "--debug" flag (which already exists) as the patch below shows (1) [https://github.com/instaclustr/cassandra/commit/4c3ec54ddefb34f6a5fcb6df0ad45c4ac95bdedb] was (Author: smiklosovic): This patch prints elapsed times to everything (1) when --debug is specified with cqlsh: {code:java} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; (3ms elapsed) cassandra@cqlsh> DROP KEYSPACE ks2 ; (525ms elapsed) cassandra@cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) (4ms elapsed) {code} I would personally hide this behind a flag in cqlshrc option. It could be also activated automatically if cqlsh is executed with "--debug" flag (which already exists) as the patch below shows (1) [https://github.com/instaclustr/cassandra/commit/4c3ec54ddefb34f6a5fcb6df0ad45c4ac95bdedb] > add time elapsed for simple CQL statement in the cql shell > -- > > Key: CASSANDRA-18861 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18861 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Semantics >Reporter: Ling Mao >Assignee: Ling Mao >Priority: Normal > Fix For: 5.x > > -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-18861) add time elapsed for simple CQL statement in the cql shell
[ https://issues.apache.org/jira/browse/CASSANDRA-18861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17767906#comment-17767906 ] Stefan Miklosovic edited comment on CASSANDRA-18861 at 9/22/23 9:10 AM: This patch prints elapsed times to everything (1) when --debug is specified with cqlsh: {code:java} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; (3ms elapsed) cassandra@cqlsh> DROP KEYSPACE ks2 ; (525ms elapsed) cassandra@cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) (4ms elapsed) {code} I would personally hide this behind a flag in cqlshrc option. It could be also activated automatically if cqlsh is executed with "--debug" flag (which already exists) as the patch below shows (1) [https://github.com/instaclustr/cassandra/commit/4c3ec54ddefb34f6a5fcb6df0ad45c4ac95bdedb] was (Author: smiklosovic): This patch prints elapsed times to everything (1) {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; (3ms elapsed) cassandra@cqlsh> DROP KEYSPACE ks2 ; (525ms elapsed) cassandra@cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) (4ms elapsed) {code} I would personally hide this behind a flag in cqlshrc option. It could be also activated automatically if cqlsh is executed with "--debug" flag (which already exists). (1) https://github.com/instaclustr/cassandra/commit/c4911edeaa769849e1f1dff8dcd33a6784c26310 > add time elapsed for simple CQL statement in the cql shell > -- > > Key: CASSANDRA-18861 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18861 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Semantics >Reporter: Ling Mao >Assignee: Ling Mao >Priority: Normal > Fix For: 5.x > > -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-18861) add time elapsed for simple CQL statement in the cql shell
[ https://issues.apache.org/jira/browse/CASSANDRA-18861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17767906#comment-17767906 ] Stefan Miklosovic edited comment on CASSANDRA-18861 at 9/22/23 9:03 AM: This patch prints elapsed times to everything (1) {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; (3ms elapsed) cassandra@cqlsh> DROP KEYSPACE ks2 ; (525ms elapsed) cassandra@cqlsh> SELECT * from system_views.queries ; thread_id | queued_micros | running_micros | task ---+---++-- (0 rows) (4ms elapsed) {code} I would personally hide this behind a flag in cqlshrc option. It could be also activated automatically if cqlsh is executed with "--debug" flag (which already exists). (1) https://github.com/instaclustr/cassandra/commit/c4911edeaa769849e1f1dff8dcd33a6784c26310 was (Author: smiklosovic): This patch prints elapsed times to everything (1) {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; (3ms elapsed) cassandra@cqlsh> DROP KEYSPACE ks2 ; (525ms elapsed) {code} I would personally hide this behind a flag in cqlshrc option. It could be also activated automatically if cqlsh is executed with "--debug" flag (which already exists). (1) https://github.com/instaclustr/cassandra/commit/c4911edeaa769849e1f1dff8dcd33a6784c26310 > add time elapsed for simple CQL statement in the cql shell > -- > > Key: CASSANDRA-18861 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18861 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Semantics >Reporter: Ling Mao >Assignee: Ling Mao >Priority: Normal > Fix For: 5.x > > -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-18861) add time elapsed for simple CQL statement in the cql shell
[ https://issues.apache.org/jira/browse/CASSANDRA-18861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17767906#comment-17767906 ] Stefan Miklosovic edited comment on CASSANDRA-18861 at 9/22/23 9:02 AM: This patch prints elapsed times to everything (1) {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; (3ms elapsed) cassandra@cqlsh> DROP KEYSPACE ks2 ; (525ms elapsed) {code} I would personally hide this behind a flag in cqlshrc option. It could be also activated automatically if cqlsh is executed with "--debug" flag (which already exists). (1) https://github.com/instaclustr/cassandra/commit/c4911edeaa769849e1f1dff8dcd33a6784c26310 was (Author: smiklosovic): This patch prints elapsed times to everything (1) {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; (3ms elapsed) cassandra@cqlsh> DROP KEYSPACE ks2 ; (525ms elapsed) {code} I would personally hide this behind a flag in cqlshrc option. It could be also activated automatically if cqlsh is executed with "--debug" flag (which already exists). (1) https://github.com/instaclustr/cassandra/commit/5e8b9d20cc8ed1fe75e3b4d242372e561153de9a > add time elapsed for simple CQL statement in the cql shell > -- > > Key: CASSANDRA-18861 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18861 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Semantics >Reporter: Ling Mao >Assignee: Ling Mao >Priority: Normal > Fix For: 5.x > > -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-18861) add time elapsed for simple CQL statement in the cql shell
[ https://issues.apache.org/jira/browse/CASSANDRA-18861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17767906#comment-17767906 ] Stefan Miklosovic edited comment on CASSANDRA-18861 at 9/22/23 8:55 AM: This patch prints elapsed times to everything (1) {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; (3ms elapsed) cassandra@cqlsh> DROP KEYSPACE ks2 ; (525ms elapsed) {code} I would personally hide this behind a flag in cqlshrc option. It could be also activated automatically if cqlsh is executed with "--debug" flag (which already exists). (1) https://github.com/instaclustr/cassandra/commit/5e8b9d20cc8ed1fe75e3b4d242372e561153de9a was (Author: smiklosovic): This patch prints elapsed times to everything (1) {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; (3ms elapsed) cassandra@cqlsh> DROP KEYSPACE ks2 ; (525ms elapsed) {code} I would personally hide this behind a flag in cqlsh. It could be also activated automatically if cqlsh is executed with "--debug" flag (which already exists). (1) https://github.com/instaclustr/cassandra/commit/5e8b9d20cc8ed1fe75e3b4d242372e561153de9a > add time elapsed for simple CQL statement in the cql shell > -- > > Key: CASSANDRA-18861 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18861 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Semantics >Reporter: Ling Mao >Assignee: Ling Mao >Priority: Normal > Fix For: 5.x > > -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-18861) add time elapsed for simple CQL statement in the cql shell
[ https://issues.apache.org/jira/browse/CASSANDRA-18861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17767906#comment-17767906 ] Stefan Miklosovic edited comment on CASSANDRA-18861 at 9/22/23 8:54 AM: This patch prints elapsed times to everything (1) {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; (3ms elapsed) cassandra@cqlsh> DROP KEYSPACE ks2 ; (525ms elapsed) {code} I would personally hide this behind a flag in cqlsh. It could be also activated automatically if cqlsh is executed with "--debug" flag (which already exists). (1) https://github.com/instaclustr/cassandra/commit/5e8b9d20cc8ed1fe75e3b4d242372e561153de9a was (Author: smiklosovic): This patch prints elapsed timestamps to everything (1) {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; (3ms elapsed) cassandra@cqlsh> DROP KEYSPACE ks2 ; (525ms elapsed) {code} I would personally hide this behind a flag in cqlsh. It could be also activated automatically if cqlsh is executed with "--debug" flag (which already exists). (1) https://github.com/instaclustr/cassandra/commit/5e8b9d20cc8ed1fe75e3b4d242372e561153de9a > add time elapsed for simple CQL statement in the cql shell > -- > > Key: CASSANDRA-18861 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18861 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Semantics >Reporter: Ling Mao >Assignee: Ling Mao >Priority: Normal > Fix For: 5.x > > -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-18861) add time elapsed for simple CQL statement in the cql shell
[ https://issues.apache.org/jira/browse/CASSANDRA-18861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17767889#comment-17767889 ] Stefan Miklosovic edited comment on CASSANDRA-18861 at 9/22/23 8:31 AM: examples of the output: {code} cassandra@cqlsh> ALTER TABLE myks.mytb ADD age int; {code} {code} cassandra@cqlsh> list USERS ; name | super | datacenters ---+---+- cassandra | True | ALL (1 rows, 12ms elapsed) {code} {code} cassandra@cqlsh> update myks.mytb SET name = 'stefan' WHERE id = 1; cassandra@cqlsh> update myks.mytb SET name = 'stefan' WHERE id = 1 IF exists; [applied] --- True (36ms elapsed) {code} {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe') IF NOT EXISTS ; APPLY BATCH; [applied] | id | name ---++-- False | 1 | joe (8ms elapsed) {code} It is interesting to see that elapsed time is written only for CAS statements. So if I do this when one statement is CAS and another is not: {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe') IF NOT EXISTS; insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; [applied] | id | name ---++-- False | 1 | joe (9ms elapsed) {code} It will basically take into account not the time of whole batch but only of statements which are CAS. So it will leave out another one from the elapsed time computation. Or am I getting it wrong? That is because of this (1). Basically, we will ever have that elapsed timeout displayed only in case a statement returns some rows back to client and we completely leave out all other statements which is quite unfortunate. Maybe it would be better to hide this behind a flag in cqlshrc and once turned on (default turned off), it would write the elapsed time to absolutely everything? I mean ... we either print it _everywhere_ if a user asked for it or nowhere. I dont see a reason why it should be displayed only for statements returning a row. For example, if I do "DROP KEYSPACE mykeyspace", it will take way more than a couple of milliseconds. That is because dropping of a keyspace seems to be synchronous operation from CQLSH perspective. Even I do not know how long that statement took exactly, one can just feel from the CQLSH as he is executing that statement that it takes way longer than "3ms". (1) https://github.com/apache/cassandra/blob/a4e5e0bd2e5bf80275443bcefc72cebad5ea10fc/pylib/cqlshlib/cqlshmain.py#L996-L1006 was (Author: smiklosovic): examples of the output: {code} cassandra@cqlsh> ALTER TABLE myks.mytb ADD age int; {code} {code} cassandra@cqlsh> list USERS ; name | super | datacenters ---+---+- cassandra | True | ALL (1 rows, 12ms elapsed) {code} {code} cassandra@cqlsh> update myks.mytb SET name = 'stefan' WHERE id = 1; cassandra@cqlsh> update myks.mytb SET name = 'stefan' WHERE id = 1 IF exists; [applied] --- True (36ms elapsed) {code} {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe') IF NOT EXISTS ; APPLY BATCH; [applied] | id | name ---++-- False | 1 | joe (8ms elapsed) {code} It is interesting to see that elapsed time is written only for CAS statements. So if I do this when one statement is CAS and another is not: {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe') IF NOT EXISTS; insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; [applied] | id | name ---++-- False | 1 | joe (9ms elapsed) {code} It will basically take into account not the time of whole batch but only of statements which are CAS. So it will leave out another one from the elapsed time computation. Or am I getting it wrong? That is because of this (1). Basically, we will ever have that elapsed timeout displayed only in case a statement returns some rows back to client and we completely leave out all other statements which is quite unfortunate. Maybe it would be better to hide this behind a flag in cqlshrc and once turned on (default turned off), it would write the elapsed time to absolutely everything? I mean ... we either print it _everywhere_ if a user asked for it or nowhere. I dont see a reason why it should be displayed only for statements returning a row. (1) https://github.com/apache/cassandra/blob/a4e5e0bd2e5bf80275443bcefc72cebad5ea10fc/pylib/cqlshlib/cqlshmain.py#L996-L1006 > add time elapsed for simple CQL statement in the cql shell > -- > > Key:
[jira] [Comment Edited] (CASSANDRA-18861) add time elapsed for simple CQL statement in the cql shell
[ https://issues.apache.org/jira/browse/CASSANDRA-18861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17767889#comment-17767889 ] Stefan Miklosovic edited comment on CASSANDRA-18861 at 9/22/23 8:26 AM: examples of the output: {code} cassandra@cqlsh> ALTER TABLE myks.mytb ADD age int; {code} {code} cassandra@cqlsh> list USERS ; name | super | datacenters ---+---+- cassandra | True | ALL (1 rows, 12ms elapsed) {code} {code} cassandra@cqlsh> update myks.mytb SET name = 'stefan' WHERE id = 1; cassandra@cqlsh> update myks.mytb SET name = 'stefan' WHERE id = 1 IF exists; [applied] --- True (36ms elapsed) {code} {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe') IF NOT EXISTS ; APPLY BATCH; [applied] | id | name ---++-- False | 1 | joe (8ms elapsed) {code} It is interesting to see that elapsed time is written only for CAS statements. So if I do this when one statement is CAS and another is not: {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe') IF NOT EXISTS; insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; [applied] | id | name ---++-- False | 1 | joe (9ms elapsed) {code} It will basically take into account not the time of whole batch but only of statements which are CAS. So it will leave out another one from the elapsed time computation. Or am I getting it wrong? That is because of this (1). Basically, we will ever have that elapsed timeout displayed only in case a statement returns some rows back to client and we completely leave out all other statements which is quite unfortunate. Maybe it would be better to hide this behind a flag in cqlshrc and once turned on (default turned off), it would write the elapsed time to absolutely everything? I mean ... we either print it _everywhere_ if a user asked for it or nowhere. I dont see a reason why it should be displayed only for statements returning a row. (1) https://github.com/apache/cassandra/blob/a4e5e0bd2e5bf80275443bcefc72cebad5ea10fc/pylib/cqlshlib/cqlshmain.py#L996-L1006 was (Author: smiklosovic): examples of the output: {code} cassandra@cqlsh> ALTER TABLE myks.mytb ADD age int; {code} {code} cassandra@cqlsh> list USERS ; name | super | datacenters ---+---+- cassandra | True | ALL (1 rows, 12ms elapsed) {code} {code} cassandra@cqlsh> update myks.mytb SET name = 'stefan' WHERE id = 1; cassandra@cqlsh> update myks.mytb SET name = 'stefan' WHERE id = 1 IF exists; [applied] --- True (36ms elapsed) {code} {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe') IF NOT EXISTS ; APPLY BATCH; [applied] | id | name ---++-- False | 1 | joe (8ms elapsed) {code} It is interesting to see that elapsed time is written only for CAS statements. So if I do this when one statement is CAS and another is not: {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe') IF NOT EXISTS; insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; [applied] | id | name ---++-- False | 1 | joe (9ms elapsed) {code} It will basically take into account not the time of whole batch but only of statements which are CAS. So it will leave out another one from the elapsed time computation. That is because of this (1). Basically, we will ever have that elapsed timeout displayed only in case a statement returns some rows back to client and we completely leave out all other statements which is quite unfortunate. Maybe it would be better to hide this behind a flag in cqlshrc and once turned on (default turned off), it would write the elapsed time to absolutely everything? I mean ... we either print it _everywhere_ if a user asked for it or nowhere. I dont see a reason why it should be displayed only for statements returning a row. (1) https://github.com/apache/cassandra/blob/a4e5e0bd2e5bf80275443bcefc72cebad5ea10fc/pylib/cqlshlib/cqlshmain.py#L996-L1006 > add time elapsed for simple CQL statement in the cql shell > -- > > Key: CASSANDRA-18861 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18861 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Semantics >Reporter: Ling Mao >Assignee: Ling Mao >Priority: Normal > Fix For: 5.x > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (CASSANDRA-18861) add time elapsed for simple CQL statement in the cql shell
[ https://issues.apache.org/jira/browse/CASSANDRA-18861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17767889#comment-17767889 ] Stefan Miklosovic edited comment on CASSANDRA-18861 at 9/22/23 8:25 AM: examples of the output: {code} cassandra@cqlsh> ALTER TABLE myks.mytb ADD age int; {code} {code} cassandra@cqlsh> list USERS ; name | super | datacenters ---+---+- cassandra | True | ALL (1 rows, 12ms elapsed) {code} {code} cassandra@cqlsh> update myks.mytb SET name = 'stefan' WHERE id = 1; cassandra@cqlsh> update myks.mytb SET name = 'stefan' WHERE id = 1 IF exists; [applied] --- True (36ms elapsed) {code} {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe') IF NOT EXISTS ; APPLY BATCH; [applied] | id | name ---++-- False | 1 | joe (8ms elapsed) {code} It is interesting to see that elapsed time is written only for CAS statements. So if I do this when one statement is CAS and another is not: {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe') IF NOT EXISTS; insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; [applied] | id | name ---++-- False | 1 | joe (9ms elapsed) {code} It will basically take into account not the time of whole batch but only of statements which are CAS. So it will leave out another one from the elapsed time computation. That is because of this (1). Basically, we will ever have that elapsed timeout displayed only in case a statement returns some rows back to client and we completely leave out all other statements which is quite unfortunate. Maybe it would be better to hide this behind a flag in cqlshrc and once turned on (default turned off), it would write the elapsed time to absolutely everything? I mean ... we either print it _everywhere_ if a user asked for it or nowhere. I dont see a reason why it should be displayed only for statements returning a row. (1) https://github.com/apache/cassandra/blob/a4e5e0bd2e5bf80275443bcefc72cebad5ea10fc/pylib/cqlshlib/cqlshmain.py#L996-L1006 was (Author: smiklosovic): examples of the output: {code} cassandra@cqlsh> list USERS ; name | super | datacenters ---+---+- cassandra | True | ALL (1 rows, 12ms elapsed) {code} {code} cassandra@cqlsh> update myks.mytb SET name = 'stefan' WHERE id = 1; cassandra@cqlsh> update myks.mytb SET name = 'stefan' WHERE id = 1 IF exists; [applied] --- True (36ms elapsed) {code} {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe') IF NOT EXISTS ; APPLY BATCH; [applied] | id | name ---++-- False | 1 | joe (8ms elapsed) {code} It is interesting to see that elapsed time is written only for CAS statements. So if I do this when one statement is CAS and another is not: {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe') IF NOT EXISTS; insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; [applied] | id | name ---++-- False | 1 | joe (9ms elapsed) {code} It will basically take into account not the time of whole batch but only of statements which are CAS. So it will leave out another one from the elapsed time computation. That is because of this (1). Basically, we will ever have that elapsed timeout displayed only in case a statement returns some rows back to client and we completely leave out all other statements which is quite unfortunate. Maybe it would be better to hide this behind a flag in cqlshrc and once turned on (default turned off), it would write the elapsed time to absolutely everything? (1) https://github.com/apache/cassandra/blob/a4e5e0bd2e5bf80275443bcefc72cebad5ea10fc/pylib/cqlshlib/cqlshmain.py#L996-L1006 > add time elapsed for simple CQL statement in the cql shell > -- > > Key: CASSANDRA-18861 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18861 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Semantics >Reporter: Ling Mao >Assignee: Ling Mao >Priority: Normal > Fix For: 5.x > > -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-18861) add time elapsed for simple CQL statement in the cql shell
[ https://issues.apache.org/jira/browse/CASSANDRA-18861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17767889#comment-17767889 ] Stefan Miklosovic edited comment on CASSANDRA-18861 at 9/22/23 8:22 AM: examples of the output: {code} cassandra@cqlsh> list USERS ; name | super | datacenters ---+---+- cassandra | True | ALL (1 rows, 12ms elapsed) {code} {code} cassandra@cqlsh> update myks.mytb SET name = 'stefan' WHERE id = 1; cassandra@cqlsh> update myks.mytb SET name = 'stefan' WHERE id = 1 IF exists; [applied] --- True (36ms elapsed) {code} {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe') IF NOT EXISTS ; APPLY BATCH; [applied] | id | name ---++-- False | 1 | joe (8ms elapsed) {code} It is interesting to see that elapsed time is written only for CAS statements. So if I do this when one statement is CAS and another is not: {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe') IF NOT EXISTS; insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; [applied] | id | name ---++-- False | 1 | joe (9ms elapsed) {code} It will basically take into account not the time of whole batch but only of statements which are CAS. So it will leave out another one from the elapsed time computation. That is because of this (1). Basically, we will ever have that elapsed timeout displayed only in case a statement returns some rows back to client and we completely leave out all other statements which is quite unfortunate. Maybe it would be better to hide this behind a flag in cqlshrc and once turned on (default turned off), it would write the elapsed time to absolutely everything? (1) https://github.com/apache/cassandra/blob/a4e5e0bd2e5bf80275443bcefc72cebad5ea10fc/pylib/cqlshlib/cqlshmain.py#L996-L1006 was (Author: smiklosovic): examples of the output: {code} cassandra@cqlsh> list USERS ; name | super | datacenters ---+---+- cassandra | True | ALL (1 rows, 12ms elapsed) {code} {code} cassandra@cqlsh> update myks.mytb SET name = 'stefan' WHERE id = 1; cassandra@cqlsh> update myks.mytb SET name = 'stefan' WHERE id = 1 IF exists; [applied] --- True (36ms elapsed) {code} {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe') IF NOT EXISTS ; APPLY BATCH; [applied] | id | name ---++-- False | 1 | joe (8ms elapsed) {code} It is interesting to see that elapsed time is written only for CAS statements. So if I do this when one statement is CAS and another is not: {code} cassandra@cqlsh> BEGIN BATCH insert into myks.mytb (id, name) VALUES (1, 'joe') IF NOT EXISTS; insert into myks.mytb (id, name) VALUES (1, 'joe'); APPLY BATCH; [applied] | id | name ---++-- False | 1 | joe (9ms elapsed) {code} It will basically take into account not the time of whole batch but only of statements which are CAS. So it will leave out another one from the elapsed time computation. > add time elapsed for simple CQL statement in the cql shell > -- > > Key: CASSANDRA-18861 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18861 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Semantics >Reporter: Ling Mao >Assignee: Ling Mao >Priority: Normal > Fix For: 5.x > > -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org