{"id":34744617,"url":"https://github.com/bloomberg/ghc25-green-software-lab","last_synced_at":"2026-05-24T00:32:28.118Z","repository":{"id":321803076,"uuid":"1078465266","full_name":"bloomberg/ghc25-green-software-lab","owner":"bloomberg","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-31T15:13:34.000Z","size":57,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-08T13:45:34.679Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bloomberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-17T19:24:30.000Z","updated_at":"2025-11-13T04:21:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bloomberg/ghc25-green-software-lab","commit_stats":null,"previous_names":["bloomberg/ghc25-green-software-lab"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bloomberg/ghc25-green-software-lab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Fghc25-green-software-lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Fghc25-green-software-lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Fghc25-green-software-lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Fghc25-green-software-lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bloomberg","download_url":"https://codeload.github.com/bloomberg/ghc25-green-software-lab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Fghc25-green-software-lab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33417486,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T22:14:44.296Z","status":"ssl_error","status_checked_at":"2026-05-23T22:14:43.778Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-12-25T04:29:55.454Z","updated_at":"2026-05-24T00:32:28.108Z","avatar_url":"https://github.com/bloomberg.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Workshop Service Monitoring Tool\n\nA Python-based workshop tool that simulates a financial trading venue with mock services.\n\n## Requirements\n\nPython 3.12 is recommended to run this tool.\n\nFor Windows users once you have installed Python 3.12 you can use it directly.\nIf required you can specify an alias for `python3` to ensure the correct version is used for Mac/Linux by using the following command on the terminal.\n\n```bash\nalias python3=python3.12\n```\n\n## 🌱 The Journey Begins\n\n### Setup\n\n```bash\ngit clone \u003crepository-url\u003e\ncd ghc25-green-software-lab\n```\n\nRun the following command for validation that you are ready to start the workshop. You should see a service dashboard.\n\n```bash\npython3 workshop.py status      # Show all services\n```\n\nAfter completion let's pause together and wait for the presentation to continue with Checkpoint 1.\n\n---\n\n## 🌱 Checkpoint 1 - The Hunt for Hidden Waste\n\nStart by exploring the system’s health and historical metrics.\n\n```bash\npython3 workshop.py status                        # System health\npython3 workshop.py historical fax-service        # Historical data\n```\n\nYou might have noticed a note about \"Low utilization on large machine\" in the `python3 workshop.py status` recommendation, and another one mentioning \"Service is unused - remove from deployment.yaml to free resources\" in the `python3 workshop.py historical fax-service` command.\n\nTo make changes to the deployments of services then you can edit the `deployment.yaml` file.\n\n```bash\nghc25-green-software-lab/\n├── 📁 src/                        # Main folder\n│   ├── 📁 configuration_files/\n│   │   ├── deployment.yaml        # Service deployment configuration\n```\n\nTo get further clues and/or test whether your solution worked:\n\n```bash\npython3 workshop.py validate --checkpoint 1\n```\n\nGreat work! You have completed the first optimization by removing the unused fax-service, please wait for the presentation to continue with Checkpoint 2.\n\n---\n\n## 🌱 Checkpoint 2 - Clean Code, Clean Planet\n\nNow we will dive into the system's metrics and code to understand what is slowing it down.\n\n```bash\n# Show detailed utilization metrics\npython3 workshop.py checkpoint 2 run-market-data    # Test performance\npython3 workshop.py latency                         # Check latency\npython3 workshop.py status                          # System health\n```\n\nAfter reading the recommendations from the `python3 workshop.py status` and `python3 workshop.py latency` commands review the code and apply optimization in the function `getMarketData(api_client)` located in `get_market_data.py`.\n\n```bash\nghc25-green-software-lab/\n├── 📁 src/                        # Main folder\n│   ├── get_market_data.py         # Market data fetching\n```\n\nTo get further clues or test whether your solution worked:\n\n```bash\npython3 workshop.py validate --checkpoint 2\n```\n\nOnce you have made your changes and validated, re-run the performance test command to see the improvements.\n\n```bash\npython3 workshop.py checkpoint 2 run-market-data   # Test performance\n```\n\nYou have now completed the Python code optimization by using a bulk api in the market dataloading code, please wait for the presentation to continue with Checkpoint 3.\n\n---\n\n## 🌱 Checkpoint 3 - Green Light, Go Time\n\nFinally let's review the batch job schedule and analyze environmental impact to ensure optimal scheduling of workloads.\n\n```bash\npython3 workshop.py scheduler                       # Check job scheduling\npython3 workshop.py carbon                          # Carbon impact dashboard\n```\n\n```bash\nghc25-green-software-lab/\n├── 📁 src/                        # Main folder\n│   ├── 📁 configuration_files/\n│   │   └── schedule.yaml          # Job scheduling configuration\n```\n\nNow make changes to the `schedule.yml` file for the start_time to be run at different times and at low carbon periods (2-6AM) for each job to reduce carbon impact.\n\nReview your changes with the following commands.\n\n```bash\npython3 workshop.py scheduler\npython3 workshop.py validate --checkpoint 3\n```\n\nYou have optimized the sustainable scheduling task by running at low carbon times and non conflicting hours, please wait for the presentation to continue with Checkpoint 4.\n\n---\n\n## 🌱 Checkpoint 4 - How Green is your Code?\n\nAs we have progressed through the exercises, we can measure the sustainability improvements made to the system using the Software Carbon Intensity (SCI) metric.\n\n```bash\npython3 workshop.py software-carbon-intensity\n```\n\nThis dashboard shows the breakdown of each component of the Software Carbon Intensity (SCI) formula. Along with how each optimization has improved the overall SCI score of the system.\n\nYou have now completed the workshop, well done!\n\n### 🛠 Restore Checkpoints\n\nIf you run into issues at any point, use the commands below to reset your files back to the starting state of a checkpoint.\n\n```bash\npython3 workshop.py backup restore-checkpoint1-start # Go back to Checkpoint 1\npython3 workshop.py backup restore-checkpoint2-start # Go back to Checkpoint 2\npython3 workshop.py backup restore-checkpoint3-start # Go back to Checkpoint 3\n```\n\n## Usage\n\nThis workshop tool is a toy simulation created solely for educational and demonstration purposes within the context of this workshop. It is not representative of any real systems, services, data, or practices of Bloomberg.\n\nThe tool simulates a financial trading venue and its related services in a mock environment. All values, configurations, transactions, and service behaviors are entirely fictional and not connected to any live or production systems.\n\nNothing generated, displayed, or executed by this tool should be interpreted as real, accurate, or reflective of Bloomberg's actual infrastructure or operations.\n\nAll data and metrics, including service activity, performance values, and alerts, are randomly generated for educational purposes and do not represent real measurements, benchmarks, or recommendations. Any resemblance to real systems or values is purely coincidental.\n\nThis environment is designed solely to simulate realistic scenarios and demonstrate principles of sustainable and efficient software design.\n\nUse of this tool should be limited to the scope of the workshop and it is provided “as is,” without any guarantees of accuracy, reliability, or suitability for real-world financial applications.\n\n## License\n\nDistributed under the Apache 2.0 license.\nSee [LICENSE](LICENSE) for more information.\n\n## Acknowledgements\n\nThis README was adapted from Bloomberg's [open source project template](https://github.com/bloomberg/oss-template).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloomberg%2Fghc25-green-software-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbloomberg%2Fghc25-green-software-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloomberg%2Fghc25-green-software-lab/lists"}