MCPcopy
hub / github.com/uber/aresdb / doProfile

Method doProfile

query/aql_processor.go:791–805  ·  view source on GitHub ↗

doProfile checks the corresponding profileName against query parameter and do cuda profiling for this action if name matches.

(action func(), profileName string, stream unsafe.Pointer)

Source from the content-addressed store, hash-verified

789// doProfile checks the corresponding profileName against query parameter
790// and do cuda profiling for this action if name matches.
791func (qc *AQLQueryContext) doProfile(action func(), profileName string, stream unsafe.Pointer) {
792 if qc.Profiling == profileName {
793 // explicit waiting for cuda stream to avoid profiling previous actions.
794 cgoutils.WaitForCudaStream(stream, qc.Device)
795 utils.GetQueryLogger().Infof("Starting cuda profiler for %s", profileName)
796 cgoutils.CudaProfilerStart()
797 defer func() {
798 // explicit waiting for cuda stream to wait for completion of current action.
799 cgoutils.WaitForCudaStream(stream, qc.Device)
800 utils.GetQueryLogger().Infof("Stopping cuda profiler for %s", profileName)
801 cgoutils.CudaProfilerStop()
802 }()
803 }
804 action()
805}
806
807// processBatch allocates device memory and starts async input data
808// transferring to device memory. It then invokes previousBatchExecutor

Callers 6

expandDimensionsMethod · 0.80
filterMethod · 0.80
joinMethod · 0.80
evalMeasuresMethod · 0.80
evalDimensionsMethod · 0.80
reduceMethod · 0.80

Calls 5

WaitForCudaStreamFunction · 0.92
GetQueryLoggerFunction · 0.92
CudaProfilerStartFunction · 0.92
CudaProfilerStopFunction · 0.92
InfofMethod · 0.65

Tested by

no test coverage detected