-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_tools_directly.py
More file actions
47 lines (38 loc) · 1.17 KB
/
test_tools_directly.py
File metadata and controls
47 lines (38 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"""Test the CostAnalyzer tools directly without the agent"""
from main import CostAnalyzerAgent
def test_tools():
print("🧪 Testing CostAnalyzer Tools Directly\n")
agent = CostAnalyzerAgent()
print("="*60)
print("1. get_daily_spend_and_trend()")
print("="*60)
result = agent.get_daily_spend_and_trend()
print(result)
print()
print("="*60)
print("2. check_storage_anomaly()")
print("="*60)
result = agent.check_storage_anomaly()
print(result)
print()
print("="*60)
print("3. check_resource_utilization('production', 'api-server')")
print("="*60)
result = agent.check_resource_utilization('production', 'api-server')
print(result)
print()
print("="*60)
print("4. check_resource_utilization('production', 'worker')")
print("="*60)
result = agent.check_resource_utilization('production', 'worker')
print(result)
print()
print("="*60)
print("5. get_cost_by_service(7)")
print("="*60)
result = agent.get_cost_by_service(7)
print(result)
print()
print("✅ All tools executed successfully!")
if __name__ == "__main__":
test_tools()