Skip to content

Commit

Permalink
test: Update e2e test fixtures
Browse files Browse the repository at this point in the history
Signed-off-by: Mahendra Paipuri <[email protected]>
  • Loading branch information
mahendrapaipuri committed May 2, 2024
1 parent 748522a commit 706f7b2
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 37 deletions.
2 changes: 1 addition & 1 deletion pkg/api/models/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (u Unit) TagMap(keyTag string, valueTag string) map[string]string {
// Usage statistics of each project/tenant/namespace
type Usage struct {
ID int64 `json:"-" sql:"id" sqlitetype:"integer not null primary key"`
ResourceManager string `json:"resource_manager" sql:"resource_manager" sqlitetype:"text"` // Name of the resource manager that owns project. Eg slurm, openstack, kubernetes, etc
ResourceManager string `json:"resource_manager,omitempty" sql:"resource_manager" sqlitetype:"text"` // Name of the resource manager that owns project. Eg slurm, openstack, kubernetes, etc
NumUnits int64 `json:"num_units" sql:"num_units" sqlitetype:"integer"` // Number of consumed units
Project string `json:"project" sql:"project" sqlitetype:"text"` // Account in batch systems, Tenant in Openstack, Namespace in k8s
Usr string `json:"usr" sql:"usr" sqlitetype:"text"` // Username
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"status":"success","data":[{"resource_manager":"slurm","uuid":"1481508","name":"test_script2","project":"acc2","grp":"grp2","usr":"usr2","created_at":"2023-02-21T15:48:20+0100","started_at":"2023-02-21T15:49:06+0100","ended_at":"2023-02-21T15:57:23+0100","created_at_ts":1676990900000,"started_at_ts":1676990946000,"ended_at_ts":1676991443000,"elapsed":"00:08:17","elapsed_raw":4500,"state":"CANCELLED by 1002","allocation":{"cpus":16,"gpus":8,"mem":"320G","nodes":2},"total_gpu_billing":79520,"tags":{"exit_code":"0:0","gid":1002,"nodelist":"compute-[0-2]","nodelistexp":"compute-0|compute-1|compute-2","partition":"part1","qos":"qos1","uid":1002,"workdir":"/home/usr2"}},{"resource_manager":"slurm","uuid":"1481510","name":"test_script2","project":"acc3","grp":"grp3","usr":"usr3","created_at":"2023-02-21T15:48:20+0100","started_at":"2023-02-21T15:49:06+0100","ended_at":"2023-02-21T15:57:23+0100","created_at_ts":1676990900000,"started_at_ts":1676990946000,"ended_at_ts":1676991443000,"elapsed":"00:00:17","elapsed_raw":789,"state":"CANCELLED by 1003","allocation":{"cpus":16,"gpus":8,"mem":"320G","nodes":2},"total_gpu_billing":79520,"tags":{"exit_code":"0:0","gid":1003,"nodelist":"compute-[0-2]","nodelistexp":"compute-0|compute-1|compute-2","partition":"part1","qos":"qos1","uid":1003,"workdir":"/home/usr3"}},{"resource_manager":"slurm","uuid":"147975","name":"test_script1","project":"acc3","grp":"grp3","usr":"usr3","created_at":"2023-02-21T14:37:02+0100","started_at":"2023-02-21T14:37:07+0100","ended_at":"2023-02-21T15:26:29+0100","created_at_ts":1676986622000,"started_at_ts":1676986627000,"ended_at_ts":1676989589000,"elapsed":"00:49:22","elapsed_raw":3000,"state":"CANCELLED by 1003","allocation":{"cpus":8,"gpus":8,"mem":"320G","nodes":1},"total_gpu_billing":236960,"tags":{"exit_code":"0:0","gid":1003,"nodelist":"compute-0","nodelistexp":"compute-0","partition":"part1","qos":"qos1","uid":1003,"workdir":"/home/usr3"}},{"resource_manager":"slurm","uuid":"14508","name":"test_script2","project":"acc4","grp":"grp4","usr":"usr4","created_at":"2023-02-21T15:48:20+0100","started_at":"2023-02-21T15:49:06+0100","ended_at":"2023-02-21T15:57:23+0100","created_at_ts":1676990900000,"started_at_ts":1676990946000,"ended_at_ts":1676991443000,"elapsed":"00:08:17","elapsed_raw":4500,"state":"CANCELLED by 1004","allocation":{"cpus":16,"gpus":8,"mem":"320G","nodes":2},"total_gpu_billing":79520,"tags":{"exit_code":"0:0","gid":1004,"nodelist":"compute-[0-2]","nodelistexp":"compute-0|compute-1|compute-2","partition":"part1","qos":"qos1","uid":1004,"workdir":"/home/usr4"}},{"resource_manager":"slurm","uuid":"1479765","name":"test_script1","project":"acc1","grp":"grp8","usr":"usr8","created_at":"2023-02-21T14:37:02+0100","started_at":"2023-02-21T14:37:07+0100","ended_at":"2023-02-21T15:26:29+0100","created_at_ts":1676986622000,"started_at_ts":1676986627000,"ended_at_ts":1676989589000,"elapsed":"00:49:22","elapsed_raw":3000,"state":"CANCELLED by 1008","allocation":{"cpus":8,"gpus":8,"mem":"320G","nodes":1},"total_gpu_billing":236960,"tags":{"exit_code":"0:0","gid":1008,"nodelist":"compute-0","nodelistexp":"compute-0","partition":"part1","qos":"qos1","uid":1008,"workdir":"/home/usr8"}},{"resource_manager":"slurm","uuid":"11508","name":"test_script2","project":"acc1","grp":"grp15","usr":"usr15","created_at":"2023-02-21T15:48:20+0100","started_at":"2023-02-21T15:49:06+0100","ended_at":"2023-02-21T15:57:23+0100","created_at_ts":1676990900000,"started_at_ts":1676990946000,"ended_at_ts":1676991443000,"elapsed":"00:08:17","elapsed_raw":4500,"state":"CANCELLED by 1015","allocation":{"cpus":16,"gpus":8,"mem":"320G","nodes":2},"total_gpu_billing":79520,"tags":{"exit_code":"0:0","gid":1015,"nodelist":"compute-[0-2]","nodelistexp":"compute-0|compute-1|compute-2","partition":"part1","qos":"qos1","uid":1015,"workdir":"/home/usr15"}},{"resource_manager":"slurm","uuid":"81510","name":"test_script2","project":"acc1","grp":"grp15","usr":"usr15","created_at":"2023-02-21T15:48:20+0100","started_at":"2023-02-21T15:49:06+0100","ended_at":"2023-02-21T15:57:23+0100","created_at_ts":1676990900000,"started_at_ts":1676990946000,"ended_at_ts":1676991443000,"elapsed":"00:00:17","elapsed_raw":3533,"state":"CANCELLED by 1015","allocation":{"cpus":16,"gpus":8,"mem":"320G","nodes":2},"total_gpu_billing":79520,"tags":{"exit_code":"0:0","gid":1015,"nodelist":"compute-[0-2]","nodelistexp":"compute-0|compute-1|compute-2","partition":"part1","qos":"qos1","uid":1015,"workdir":"/home/usr23"}},{"resource_manager":"slurm","uuid":"1009248","name":"test_script2","project":"testacc","grp":"grp15","usr":"testusr","created_at":"2023-02-21T15:48:20+0100","started_at":"2023-02-21T15:49:06+0100","ended_at":"2023-02-21T15:57:23+0100","created_at_ts":1676990900000,"started_at_ts":1676990946000,"ended_at_ts":1676991443000,"elapsed":"00:00:17","elapsed_raw":17,"state":"CANCELLED by 1015","allocation":{"cpus":16,"gpus":8,"mem":"320G","nodes":2},"total_gpu_billing":79520,"tags":{"exit_code":"0:0","gid":1015,"nodelist":"compute-[0-2]","nodelistexp":"compute-0|compute-1|compute-2","partition":"part1","qos":"qos1","uid":1015,"workdir":"/home/usr23"}}]}
{"status":"success","data":[{"resource_manager":"slurm","uuid":"1481508","name":"test_script2","project":"acc2","grp":"grp2","usr":"usr2","created_at":"2023-02-21T15:48:20+0100","started_at":"2023-02-21T15:49:06+0100","ended_at":"2023-02-21T15:57:23+0100","created_at_ts":1676990900000,"started_at_ts":1676990946000,"ended_at_ts":1676991443000,"elapsed":"00:08:17","state":"CANCELLED by 1002","allocation":{"billing":160,"cpus":16,"gpus":8,"mem":343597383680,"nodes":2},"total_walltime_seconds":497,"total_cputime_seconds":7952,"total_gputime_seconds":3976,"tags":{"exit_code":"0:0","gid":1002,"nodelist":"compute-[0-2]","nodelistexp":"compute-0|compute-1|compute-2","partition":"part1","qos":"qos1","uid":1002,"workdir":"/home/usr2"}},{"resource_manager":"slurm","uuid":"1481510","name":"test_script2","project":"acc3","grp":"grp3","usr":"usr3","created_at":"2023-02-21T15:48:20+0100","started_at":"2023-02-21T15:49:06+0100","ended_at":"2023-02-21T15:57:23+0100","created_at_ts":1676990900000,"started_at_ts":1676990946000,"ended_at_ts":1676991443000,"elapsed":"00:00:17","state":"CANCELLED by 1003","allocation":{"billing":160,"cpus":16,"gpus":8,"mem":343597383680,"nodes":2},"total_walltime_seconds":497,"total_cputime_seconds":7952,"total_gputime_seconds":3976,"tags":{"exit_code":"0:0","gid":1003,"nodelist":"compute-[0-2]","nodelistexp":"compute-0|compute-1|compute-2","partition":"part1","qos":"qos1","uid":1003,"workdir":"/home/usr3"}},{"resource_manager":"slurm","uuid":"147975","name":"test_script1","project":"acc3","grp":"grp3","usr":"usr3","created_at":"2023-02-21T14:37:02+0100","started_at":"2023-02-21T14:37:07+0100","ended_at":"2023-02-21T15:26:29+0100","created_at_ts":1676986622000,"started_at_ts":1676986627000,"ended_at_ts":1676989589000,"elapsed":"00:49:22","state":"CANCELLED by 1003","allocation":{"billing":80,"cpus":8,"gpus":8,"mem":343597383680,"nodes":1},"total_walltime_seconds":2962,"total_cputime_seconds":23696,"total_gputime_seconds":23696,"tags":{"exit_code":"0:0","gid":1003,"nodelist":"compute-0","nodelistexp":"compute-0","partition":"part1","qos":"qos1","uid":1003,"workdir":"/home/usr3"}},{"resource_manager":"slurm","uuid":"14508","name":"test_script2","project":"acc4","grp":"grp4","usr":"usr4","created_at":"2023-02-21T15:48:20+0100","started_at":"2023-02-21T15:49:06+0100","ended_at":"2023-02-21T15:57:23+0100","created_at_ts":1676990900000,"started_at_ts":1676990946000,"ended_at_ts":1676991443000,"elapsed":"00:08:17","state":"CANCELLED by 1004","allocation":{"billing":160,"cpus":16,"gpus":8,"mem":343597383680,"nodes":2},"total_walltime_seconds":497,"total_cputime_seconds":7952,"total_gputime_seconds":3976,"tags":{"exit_code":"0:0","gid":1004,"nodelist":"compute-[0-2]","nodelistexp":"compute-0|compute-1|compute-2","partition":"part1","qos":"qos1","uid":1004,"workdir":"/home/usr4"}},{"resource_manager":"slurm","uuid":"1479765","name":"test_script1","project":"acc1","grp":"grp8","usr":"usr8","created_at":"2023-02-21T14:37:02+0100","started_at":"2023-02-21T14:37:07+0100","ended_at":"2023-02-21T15:26:29+0100","created_at_ts":1676986622000,"started_at_ts":1676986627000,"ended_at_ts":1676989589000,"elapsed":"00:49:22","state":"CANCELLED by 1008","allocation":{"billing":80,"cpus":8,"gpus":8,"mem":343597383680,"nodes":1},"total_walltime_seconds":2962,"total_cputime_seconds":23696,"total_gputime_seconds":23696,"tags":{"exit_code":"0:0","gid":1008,"nodelist":"compute-0","nodelistexp":"compute-0","partition":"part1","qos":"qos1","uid":1008,"workdir":"/home/usr8"}},{"resource_manager":"slurm","uuid":"11508","name":"test_script2","project":"acc1","grp":"grp15","usr":"usr15","created_at":"2023-02-21T15:48:20+0100","started_at":"2023-02-21T15:49:06+0100","ended_at":"2023-02-21T15:57:23+0100","created_at_ts":1676990900000,"started_at_ts":1676990946000,"ended_at_ts":1676991443000,"elapsed":"00:08:17","state":"CANCELLED by 1015","allocation":{"billing":160,"cpus":16,"gpus":8,"mem":343597383680,"nodes":2},"total_walltime_seconds":497,"total_cputime_seconds":7952,"total_gputime_seconds":3976,"tags":{"exit_code":"0:0","gid":1015,"nodelist":"compute-[0-2]","nodelistexp":"compute-0|compute-1|compute-2","partition":"part1","qos":"qos1","uid":1015,"workdir":"/home/usr15"}},{"resource_manager":"slurm","uuid":"81510","name":"test_script2","project":"acc1","grp":"grp15","usr":"usr15","created_at":"2023-02-21T15:48:20+0100","started_at":"2023-02-21T15:49:06+0100","ended_at":"2023-02-21T15:57:23+0100","created_at_ts":1676990900000,"started_at_ts":1676990946000,"ended_at_ts":1676991443000,"elapsed":"00:00:17","state":"CANCELLED by 1015","allocation":{"billing":160,"cpus":16,"gpus":8,"mem":343597383680,"nodes":2},"total_walltime_seconds":497,"total_cputime_seconds":7952,"total_gputime_seconds":3976,"tags":{"exit_code":"0:0","gid":1015,"nodelist":"compute-[0-2]","nodelistexp":"compute-0|compute-1|compute-2","partition":"part1","qos":"qos1","uid":1015,"workdir":"/home/usr23"}},{"resource_manager":"slurm","uuid":"1009248","name":"test_script2","project":"testacc","grp":"grp15","usr":"testusr","created_at":"2023-02-21T15:48:20+0100","started_at":"2023-02-21T15:49:06+0100","ended_at":"2023-02-21T15:57:23+0100","created_at_ts":1676990900000,"started_at_ts":1676990946000,"ended_at_ts":1676991443000,"elapsed":"00:00:17","state":"CANCELLED by 1015","allocation":{"billing":160,"cpus":16,"gpus":8,"mem":343597383680,"nodes":2},"total_walltime_seconds":497,"total_cputime_seconds":7952,"total_gputime_seconds":3976,"tags":{"exit_code":"0:0","gid":1015,"nodelist":"compute-[0-2]","nodelistexp":"compute-0|compute-1|compute-2","partition":"part1","qos":"qos1","uid":1015,"workdir":"/home/usr23"}}]}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"status":"success","data":[{"resource_manager":"slurm","uuid":"147975","name":"test_script1","project":"acc3","grp":"grp3","usr":"usr3","created_at":"2023-02-21T14:37:02+0100","started_at":"2023-02-21T14:37:07+0100","ended_at":"2023-02-21T15:26:29+0100","created_at_ts":1676986622000,"started_at_ts":1676986627000,"ended_at_ts":1676989589000,"elapsed":"00:49:22","elapsed_raw":3000,"state":"CANCELLED by 1003","allocation":{"cpus":8,"gpus":8,"mem":"320G","nodes":1},"total_gpu_billing":236960,"tags":{"exit_code":"0:0","gid":1003,"nodelist":"compute-0","nodelistexp":"compute-0","partition":"part1","qos":"qos1","uid":1003,"workdir":"/home/usr3"}},{"resource_manager":"slurm","uuid":"1481510","name":"test_script2","project":"acc3","grp":"grp3","usr":"usr3","created_at":"2023-02-21T15:48:20+0100","started_at":"2023-02-21T15:49:06+0100","ended_at":"2023-02-21T15:57:23+0100","created_at_ts":1676990900000,"started_at_ts":1676990946000,"ended_at_ts":1676991443000,"elapsed":"00:00:17","elapsed_raw":789,"state":"CANCELLED by 1003","allocation":{"cpus":16,"gpus":8,"mem":"320G","nodes":2},"total_gpu_billing":79520,"tags":{"exit_code":"0:0","gid":1003,"nodelist":"compute-[0-2]","nodelistexp":"compute-0|compute-1|compute-2","partition":"part1","qos":"qos1","uid":1003,"workdir":"/home/usr3"}}]}
{"status":"success","data":[{"resource_manager":"slurm","uuid":"147975","name":"test_script1","project":"acc3","grp":"grp3","usr":"usr3","created_at":"2023-02-21T14:37:02+0100","started_at":"2023-02-21T14:37:07+0100","ended_at":"2023-02-21T15:26:29+0100","created_at_ts":1676986622000,"started_at_ts":1676986627000,"ended_at_ts":1676989589000,"elapsed":"00:49:22","state":"CANCELLED by 1003","allocation":{"billing":80,"cpus":8,"gpus":8,"mem":343597383680,"nodes":1},"total_walltime_seconds":2962,"total_cputime_seconds":23696,"total_gputime_seconds":23696,"tags":{"exit_code":"0:0","gid":1003,"nodelist":"compute-0","nodelistexp":"compute-0","partition":"part1","qos":"qos1","uid":1003,"workdir":"/home/usr3"}},{"resource_manager":"slurm","uuid":"1481510","name":"test_script2","project":"acc3","grp":"grp3","usr":"usr3","created_at":"2023-02-21T15:48:20+0100","started_at":"2023-02-21T15:49:06+0100","ended_at":"2023-02-21T15:57:23+0100","created_at_ts":1676990900000,"started_at_ts":1676990946000,"ended_at_ts":1676991443000,"elapsed":"00:00:17","state":"CANCELLED by 1003","allocation":{"billing":160,"cpus":16,"gpus":8,"mem":343597383680,"nodes":2},"total_walltime_seconds":497,"total_cputime_seconds":7952,"total_gputime_seconds":3976,"tags":{"exit_code":"0:0","gid":1003,"nodelist":"compute-[0-2]","nodelistexp":"compute-0|compute-1|compute-2","partition":"part1","qos":"qos1","uid":1003,"workdir":"/home/usr3"}}]}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"status":"success","data":[{"resource_manager":"slurm","num_units":2,"project":"acc3","usr":"usr3","total_cpu_billing":0,"total_gpu_billing":316480,"total_misc_billing":0,"avg_cpu_usage":0,"avg_cpu_mem_usage":0,"total_cpu_energy_usage_kwh":0,"total_cpu_emissions_gms":0,"avg_gpu_usage":0,"avg_gpu_mem_usage":0,"total_gpu_energy_usage_kwh":0,"total_gpu_emissions_gms":0,"total_io_write_hot_gb":0,"total_io_read_hot_gb":0,"total_io_write_cold_gb":0,"total_io_read_cold_gb":0,"total_ingress_in_gb":0,"total_outgress_in_gb":0}]}
{"status":"success","data":[{"resource_manager":"slurm","num_units":2,"project":"acc3","usr":"usr3","total_walltime_seconds":3459,"total_cputime_seconds":31648,"total_gputime_seconds":27672,"total_cpumemtime_seconds":1133445120,"total_gpumemtime_seconds":3459}]}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"status":"success","data":[{"resource_manager":"slurm","num_units":2,"project":"acc3","usr":"usr3","total_cpu_billing":0,"total_gpu_billing":316480,"total_misc_billing":0,"avg_cpu_usage":0,"avg_cpu_mem_usage":0,"total_cpu_energy_usage_kwh":0,"total_cpu_emissions_gms":0,"avg_gpu_usage":0,"avg_gpu_mem_usage":0,"total_gpu_energy_usage_kwh":0,"total_gpu_emissions_gms":0,"total_io_write_hot_gb":0,"total_io_read_hot_gb":0,"total_io_write_cold_gb":0,"total_io_read_cold_gb":0,"total_ingress_in_gb":0,"total_outgress_in_gb":0}]}
{"status":"success","data":[{"resource_manager":"slurm","num_units":2,"project":"acc3","usr":"usr3","total_walltime_seconds":3459,"total_cputime_seconds":31648,"total_gputime_seconds":27672,"total_cpumemtime_seconds":1133445120,"total_gpumemtime_seconds":3459}]}
Loading

0 comments on commit 706f7b2

Please sign in to comment.