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

Azure SQL database results showing numbers that look incorrect #1271

Open
2 tasks done
HalldorLyngmo opened this issue Nov 22, 2023 · 0 comments
Open
2 tasks done

Azure SQL database results showing numbers that look incorrect #1271

HalldorLyngmo opened this issue Nov 22, 2023 · 0 comments

Comments

@HalldorLyngmo
Copy link

HalldorLyngmo commented Nov 22, 2023

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Operating System:
    • macOS 14.0 also tested with a linux docker container
  • Browser:
    • Chrome Version 118.0.5993.117 (Official Build) (arm64)
  • Git branch/tag
    • release-2023-11-13

Expected Behavior

I've recently started to test the tool with our Azure subscriptions. However, the results for some services such as the SQL database have been difficult to believe. When running the tool for a single subscription using the cli I get this result for a single day.

yarn start-cli --startDate $YESTERDAY_DATE --endDate $YESTERDAY_DATE --format "csv" --groupBy "dayAndService"

(I left in the Azure App Service to show that we are getting some results)

Date (UTC) Azure App Service kilowatt hours Azure App Service metric tons CO2e Emissions SQL Database kilowatt hours SQL Database metric tons CO2e Emissions
2023-11-20 27.74 0.009108 0 0.000001
Total 27.74 0.009108 0 0.000001

In that specific subscription we have around 15 SQL Servers / 70 Elastic Pools / 6000+ databases

I would expect to see a higher emission number than what we get...

Actual Behavior

Described above ⬆️

To Reproduce

A setup with a SQL Server, an elastic pool and plenty of databases should be sufficient.

My thought is that the CCF logic is not factoring in the elastic pools, or that the result from the Azure API is unexpected when there are Elastic Pool in use.

I tried to follow the SQL Database logic in the code but I couldn't quite figure it out. If you have any debugging hints they would be appreciated.

Screenshots

Additional Information

© 2021 Thoughtworks, Inc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant