Skip to content

jashtanna/task-golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auction Simulator

A simple auction simulator that runs 40 auctions at the same time, each with 100 bidders.

How to Run

go run main.go

What it Does

  • Runs 40 auctions concurrently (all at once)
  • Each auction has 100 bidders
  • Each item has 20 random attributes (like condition, age, color, etc.)
  • Most bidders bid (75% participate), some don't (25%)
  • Bids range from $100 to $10,100
  • Highest bid wins
  • Results saved to output/ folder as JSON files

Example Output

System Resources: vCPU=12

=== AUCTION RESULTS ===
Total Execution Time: 7.2814ms
Total Auctions: 40
Total Bids Received: 2976
Auctions with Winners: 40
Average Bids per Auction: 74.40

Why Results are Different Every Time

The simulator uses random data:

  • Random bidders participate (not everyone bids)
  • Random bid amounts for each bid
  • So each run produces different winners and different amounts

Each time you run it, the output/ folder gets new data overwriting the old files.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages