eXist-db / xst

Command line tool to interact with exist-db instances
https://npmjs.com/@existdb/xst
MIT License
17 stars 4 forks source link

Add duration time for the execute command #224

Open daliboris opened 6 months ago

daliboris commented 6 months ago

Enhancement

Some commands, for instance upload, shows the duratoin in the output, for example Created 0 collections and uploaded 1 resources in 292ms.

In the case of execute command, I'm missing this information.

I'm debugging the indexing routine by modifying the indexes and input data. I repeat the same command with different data (collection.xconf, index.xql, input.xml): xst execute "xmldb:reindex('/db/apps/teilex0-publisher/data/playground')" --config admin.xstrc.

Duration of the task is significant for my case.

Alternatives

I run the command using xst and watch the INFO in the eXist-db log.

line-o commented 6 months ago

I think getting timings on query execution is a useful addition @daliboris Couple of thoughts on the details:

  1. I prefer to stats similar to what eXide returns
    • compilation time
    • execution time
    • not have the timings include network transport (the overall time that upload reports)
      1. I prefer to have these timings only being output when a flag is set on the command line (e.g. --stats) For a lot of use-cases, where you want to work with the returned result, additional output would be problematic and this would break those.