Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python Wrapper #108

Closed
webysther opened this issue Mar 4, 2020 · 5 comments
Closed

Python Wrapper #108

webysther opened this issue Mar 4, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@webysther
Copy link
Contributor

webysther commented Mar 4, 2020

There's a great python decoupled from ripsaw to get result information of HammerDB and format to machine-readable format.

Looking the wrapper code looks a little focus on ElasticSearch and I think to create a library on pip like:

pip install hammerdb

This library will use docker version (after creating a image with all drivers and driver specific database tag).

Thinking in this strategy, sounds good provide a solution to get results in modern machine-readable format like JSON, Parquet and Dataframe but XML, CSV.

This is better than parse a semi-structured result that can change without notice.

This is tottally different from #17

Questions:

  • There's a better way to get results?
  • What is the thoughts about this ideia?
  • What suggestions for this solution?
@sm-shaw
Copy link
Contributor

sm-shaw commented Mar 4, 2020

As some initial thoughts there is a current way to get the output of HammerDB in JSON format using the HammerDB web service by running hammerdbws instead of hammerdbcli. Some details are here https://www.hammerdb.com/blog/uncategorized/using-hammerdb-as-a-web-service/. Using this the output is now decoupled so instead is stored in a SQLite database referenced by a job id and retrieved in JSON format. In theory it would be possible to do this in CLI mode as well if there was enough demand for it.

For #17 definitely appreciate this is different - just to note for anyone following up on Python with HammerDB that adding Python to HammerDB for running workloads is straightforward however testing has shown Python performance to be very poor for performance testing. The reason is the single threaded nature of Python (GIL) even with multiple threads, so if multiple HammerDB virtual users create Python interpreters they can only ever run single threaded at the back end. Therefore for any workload that is performance critical the native TCL threading built into HammerDB definitely remains the way to go.

@webysther
Copy link
Contributor Author

Yes, the wrapper make more sense because use the threading power of TCL and be reuse the job done and expands the use for another's structures and make possible to other scale.

As-a-webs-service sounds to big to a benchmark, sounds more powerful create multiple hammerdb docker container using python in a master machine creating a benchmark to multiple databases at same time. Ok, there's a lot of considerations here, but, I think this is a start point for a bright future. <3

@webysther
Copy link
Contributor Author

I will work in something like this, if any change good or not I will update this issue.

@sm-shaw
Copy link
Contributor

sm-shaw commented May 12, 2021

A newer python TCL integration package https://github.com/flightaware/tohil

@sm-shaw
Copy link
Contributor

sm-shaw commented Jun 16, 2023

Python CLI interface was added in v4.6

@sm-shaw sm-shaw closed this as completed Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants