{"id":28536647,"url":"https://github.com/chakib-belgaid/jreferral","last_synced_at":"2025-07-08T03:31:00.449Z","repository":{"id":131259542,"uuid":"362141297","full_name":"chakib-belgaid/jreferral","owner":"chakib-belgaid","description":"An open-source tool that recommends the most energy efficient JVM configuration for java software ","archived":false,"fork":false,"pushed_at":"2023-07-27T12:12:20.000Z","size":2515,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-09T18:07:04.885Z","etag":null,"topics":["benchmark","energy","energy-consumption","energy-efficiency","java","jvm","optimization"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chakib-belgaid.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-27T14:27:33.000Z","updated_at":"2024-11-11T15:34:07.000Z","dependencies_parsed_at":"2025-04-13T14:51:23.117Z","dependency_job_id":"30f415cf-f194-4afc-a2a9-d4e58d553cab","html_url":"https://github.com/chakib-belgaid/jreferral","commit_stats":{"total_commits":29,"total_committers":3,"mean_commits":9.666666666666666,"dds":0.2068965517241379,"last_synced_commit":"d41654f009b11ea4e70576ef2a81a008b5434a07"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chakib-belgaid/jreferral","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chakib-belgaid%2Fjreferral","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chakib-belgaid%2Fjreferral/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chakib-belgaid%2Fjreferral/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chakib-belgaid%2Fjreferral/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chakib-belgaid","download_url":"https://codeload.github.com/chakib-belgaid/jreferral/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chakib-belgaid%2Fjreferral/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264190724,"owners_count":23570553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","energy","energy-consumption","energy-efficiency","java","jvm","optimization"],"created_at":"2025-06-09T18:07:08.183Z","updated_at":"2025-07-08T03:31:00.444Z","avatar_url":"https://github.com/chakib-belgaid.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JReferral  \nA tool that run your java program through multiple versions of JVMs and optimisation options to recommand the most energry efficiant configuration.  \n\n## Requirements \n- **Docker** : we use a docker image for testing and isolating the JVM \n- **Linux** : Our tool is based on *RAPL* sensors to measure energy \n- **Python 3.5+** : for the reporting purpose \n\n\n## How to use \n\n1. Choose The configurations to be tested  in th file [jvms.sh](./src/jvms.sh) \n    - Uncomment what should be included during the tests\n\n2. Run [build-images.sh](./src/buildi-images.sh) that will build the docker images for respective jvms \n    - You can add the option **-u** to setup the  username for docker images \n    - The images will have the format***username/jvm:version**\n3. Replace the word **java** with **src/jrecommand.sh** in your command \n    - Example \n        ``` \n        java -jar example.jar arg1 arg2 ...\n        will be \n        ./jreferral.sh -jar example.jar arg1 arg2 ...\n        ```\n\nYou will find the results in `data.csv` and the execution log in `exp.log`\n\n### Note: \nDue to security reasons, you need sudo access in order to measure the energy  \n\n## Bulk Benchmarking \n\nIf you want to test multiple benchmarks you can use [bulk.sh](./src/bulk.sh), to do So\n\n1. Put your benchmarks in a file as an exmple `example_bulks.sh` \n\n2. Run the script [bulk.sh](./src/bulk.sh) giving him as entry the path of your *bulks_file*\n    - Example\n        ``` \n        ./src/bulk.sh example_bulks.sh\n        ```\n## Plotting the results \n\nWith the option `-p` the program will generate a pdf file containaing all the measures aka *execution time* and *energies* for each benchmark. \n\n- In order to have more visible name for the different tunning options you can put them in the [tagging file](src/jvms-option-names.sh) using the following format \n\n    `options` **TAG** `visible tag` \n    \n- Example:\n    ```\n    -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:+AlwaysPreTouch TAG EpsilonGC\n    ```\nThe tests with this options will take the name of EpsilonGC in the graphs \n## Flags and options \n\n- For both `jreferral.sh` and `bulk.sh`\n\n|**Flag**|**Description**|**Default value**|\n|--------|---------------|:---------------:|\n| -u *name* | The username of docker images | user |\n| -o *filename* | The filename where the all the measures should be put in | data.csv|\n| -l *filename* | Redirection of the output of the tests | exp.log |\n| -n *Number* | The number of iterations that should be run for each configuration | 1 | \n| -s *Duration* | Time to wait between two consecutive tests (in order to avoid the test impacting each others ) | 3s | sec|\n| -d | print the *DRAM* energy and *CPU* energy seperately | False | \n| -p | generate a *pdf* that containes all the measures in format of boxplot  | False | \n\n\n\n## Example\n### Recap\n\nThis is an example to test the energy consumption of [zip4j](https://github.com/srikanth-lingala/zip4j)\n\n\n![zip4j](https://github.com/chakib-belgaid/jreferral/blob/master/imgs/zip4j.png?raw=true)\n\nand for the detailed version (aka -d)\n\n\n![zip4j detailed ](https://github.com/chakib-belgaid/jreferral/blob/master/imgs/zip4jdetailed.png?raw=true)\n\n\n### Plots \n\n\nEnergy consumption of  **CPU** \n\n![zip4j](https://github.com/chakib-belgaid/jreferral/blob/master/imgs/zip4j_1_CPU.png?raw=true)\n\n\n\nEnergy consumption of  **DRAM** \n\n![zip4j](https://github.com/chakib-belgaid/jreferral/blob/master/imgs/zip4j_1_DRAM.png?raw=true)\n\n\n**Execution of Time** \n\n![zip4j](https://github.com/chakib-belgaid/jreferral/blob/master/imgs/zip4j_1_duration.png?raw=true)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchakib-belgaid%2Fjreferral","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchakib-belgaid%2Fjreferral","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchakib-belgaid%2Fjreferral/lists"}