MCPcopy Create free account
hub / github.com/ModelEngine-Group/flexai / test

Function test

GPU-Virtual-Service/gpu-remoting/src/storage/PyShmqueue.py:188–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186
187
188def test():
189 shmkey = 100010
190 queuesize = 10240
191 queueModule = ONE_READ_ONE_WRITE
192 shmqueue = ShareMemoryQueue(shmkey, 10 * 2, queueModule, 1)
193
194 # data = np.array([1, 2, 3, 4, 5 ,6, 7], dtype=np.uint8) # Assuming you have some data to write
195 sequence_array = np.arange(10, dtype=np.uint8)
196 print("write data: ", sequence_array)
197 print("len: ", len(sequence_array))
198 for i in range(10):
199 error_code = shmqueue.write(sequence_array, i)
200 while error_code != 0:
201 error_code = shmqueue.write(sequence_array, i)
202 shmqueue.PrintTrunk()
203
204
205 # print(shmqueue.getQueueLength())
206# test()

Callers

nothing calls this directly

Calls 3

writeMethod · 0.95
PrintTrunkMethod · 0.95
ShareMemoryQueueClass · 0.85

Tested by

no test coverage detected