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

A Faker test data generation tool with a simplistic performance test. #108

Conversation

johrenberger
Copy link
Contributor

@johrenberger johrenberger commented Dec 19, 2023

While experimenting with Python and Faker I found that the test data samples could benefit from a more dynamic, scalable tool to more efficiently generate data on the fly.

csv_random_data_generator.py - This class has the Faker structure in place with several of the variables customized with AWS specific data. This lended to more realistic data generated at random. The bottom of the file includes several commands to generate an inital file (also attached) with 1000 records. There are opportunities to enhance it to include google or Azure options as well.

focus_validator_performance_test.py - Super simple performance test that exercises the 1,000 record csv to see what it's performance capabilities are. This can be enhanced for more complex scaling, created more for curiousity.

I am not a Python expert but thought the data generation would be useful for generating more interesting, on the fly, scaled data samples for testing.

Signed-off-by: Justin Ohrenberger justinohrenberger@gmail.com

Copy link
Contributor Author

@johrenberger johrenberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: Justin Ohrenberger justinohrenberger@gmail.com

Signed-off-by: Justin Ohrenberger <justinohrenberger@gmail.com>
Signed-off-by: Justin Ohrenberger <justinohrenberger@gmail.com>
@johrenberger johrenberger force-pushed the faker-simple-performance-tests branch from 8185950 to 96aaf04 Compare December 20, 2023 01:52
.gitignore Outdated Show resolved Hide resolved
self.ChargePeriodStart = fake.date_time_this_month(before_now=True, after_now=False, tzinfo=None).isoformat()
self.ChargePeriodEnd = fake.date_time_this_month(before_now=True, after_now=False, tzinfo=None).isoformat()
self.BilledCost = fake.pyfloat(left_digits=3,right_digits=2, positive=True)
self.AmortizedCost = fake.pyfloat(left_digits=3,right_digits=2, positive=True)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We renamed AmoirtizedCost to EffectiveCost i think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.github/workflows/publish.yaml Outdated Show resolved Hide resolved
Signed-off-by: Justin Ohrenberger <justinohrenberger@gmail.com>
Signed-off-by: Justin Ohrenberger <justinohrenberger@gmail.com>
@varunmittal91 varunmittal91 merged commit d6e9ba1 into finopsfoundation:main Jan 5, 2024
6 checks passed
mike-finopsorg pushed a commit that referenced this pull request Jun 6, 2024
…#108)

Signed-off-by: Justin Ohrenberger <justinohrenberger@gmail.com>
mike-finopsorg pushed a commit that referenced this pull request Jun 6, 2024
…#108)

Signed-off-by: Justin Ohrenberger <justinohrenberger@gmail.com>
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

Successfully merging this pull request may close these issues.

2 participants