Sets the storage profiler.

    Args:
      storage_profiler (StorageProfiler): storage profiler.
5717
def SetStorageProfiler(self, storage_profiler):
    
    self._storage_profiler = storage_profiler
    if self._storage_file:
      self._storage_file.SetStorageProfiler(storage_profiler)
1285864
def enable_thread_profiling(profile_dir, exception_callback=None):
    
    global profiled_thread_enabled, Thread, Process
    if os.path.isdir(profile_dir):
        _Profiler.profile_dir = profile_dir
    else:
        raise OSError('%s does not exist' % profile_dir)
    _Profiler.exception_callback = exception_callback
    Thread = threading.Thread = ProfiledThread
    Process = multiprocessing.Process = ProfiledProcess
    profiled_thread_enabled = True
880503
def set_metadata(self, queue, metadata, clear=False):
        
        return self._manager.set_metadata(queue, metadata, clear=clear)
661642
def set_storage_data(address, index, value)
      address = Utils.normalize_address address

      cache_key = "storage:#{address}"
      unless @caches.has_key?(cache_key)
        @caches[cache_key] = {}
        set_and_journal :all, address, true
      end

      set_and_journal cache_key, index, value
    end
415434
def profile_list(**kwargs):
    
    ctx = Context(**kwargs)
    ctx.execute_action('profile:list', **{
        'storage': ctx.repo.create_secure_service('storage'),
    })
74928
def _StartProfiling(self, configuration):
    
    if not configuration:
      return

    if configuration.HaveProfileMemoryGuppy():
      self._guppy_memory_profiler = profilers.GuppyMemoryProfiler(
          self._name, configuration)
      self._guppy_memory_profiler.Start()

    if configuration.HaveProfileMemory():
      self._memory_profiler = profilers.MemoryProfiler(
          self._name, configuration)
      self._memory_profiler.Start()

    if configuration.HaveProfileProcessing():
      identifier = '{0:s}-processing'.format(self._name)
      self._processing_profiler = profilers.ProcessingProfiler(
          identifier, configuration)
      self._processing_profiler.Start()

    if configuration.HaveProfileSerializers():
      identifier = '{0:s}-serializers'.format(self._name)
      self._serializers_profiler = profilers.SerializersProfiler(
          identifier, configuration)
      self._serializers_profiler.Start()

    if configuration.HaveProfileStorage():
      self._storage_profiler = profilers.StorageProfiler(
          self._name, configuration)
      self._storage_profiler.Start()

    if configuration.HaveProfileTasks():
      self._tasks_profiler = profilers.TasksProfiler(self._name, configuration)
      self._tasks_profiler.Start()
191093
def Open(self):
    
    if self._storage_file:
      raise IOError('Storage writer already opened.')

    self._storage_file = self._CreateStorageFile()

    if self._serializers_profiler:
      self._storage_file.SetSerializersProfiler(self._serializers_profiler)

    if self._storage_profiler:
      self._storage_file.SetStorageProfiler(self._storage_profiler)

    self._storage_file.Open(path=self._output_file, read_only=False)

    self._first_written_event_source_index = (
        self._storage_file.GetNumberOfEventSources())
    self._written_event_source_index = self._first_written_event_source_index
1305985
def profiling(self):
        
        self._log_profiler_started()
        while self.clients:
            try:
                self.profiler.start()
            except RuntimeError:
                pass
            # should sleep.
            yield
            self.profiler.stop()
            result = self.profiler.result()
            data = pack_msg(RESULT, result,
                            pickle_protocol=self.pickle_protocol)
            self._latest_result_data = data
            # broadcast.
            closed_clients = []
            for client in self.clients:
                try:
                    self._send(client, data)
                except socket.error as exc:
                    if exc.errno == EPIPE:
                        closed_clients.append(client)
            del data
            # handle disconnections.
            for client in closed_clients:
                self.disconnected(client)
        self._log_profiler_stopped()
1259154
def saveProfileAs( self ):
        
        name, ok = QInputDialog.getText(self, 'Create Profile', 'Name:')
        if ( not name ):
            return
        
        manager = self.parent()
        prof    = manager.viewWidget().saveProfile()
        prof.setName(nativestring(name))
        self.parent().addProfile(prof)
1278868
def reset_activation_profiles(self):
        
        # We do here some lazy loading.
        if not self._reset_activation_profiles:
            self._reset_activation_profiles = \
                ActivationProfileManager(self, profile_type='reset')
        return self._reset_activation_profiles
429224
protected function _setProfile() {
        $projectName = basename(dirname(realpath(APPLICATION_PATH)));
        $profileName = $projectName . '_' . APPLICATION_ENV;

        $this->_profile = $profileName;
    }
1012115
@Override
    public void setProfileImportExportCache(
            Cache<Tuple<String, String>, UserProfile> profileCache) {
        if (profileCache == null) {
            profileCacheHolder.remove();
        } else {
            profileCacheHolder.set(profileCache);
        }
    }
760136
def _create_storage_profile(self):
        
        if self.image_publisher:
            storage_profile = {
                'image_reference': {
                    'publisher': self.image_publisher,
                    'offer': self.image_offer,
                    'sku': self.image_sku,
                    'version': self.image_version
                },
            }
        else:
            for image in self.compute.images.list():
                if image.name == self.image_id:
                    image_id = image.id
                    break
            else:
                raise AzureCloudException(
                    'Image with name {0} not found.'.format(self.image_id)
                )

            storage_profile = {
                'image_reference': {
                    'id': image_id
                }
            }

        return storage_profile
933219
public void setActiveProfile(long identifier, boolean fireOnProfileChanged) {
        if (mAccountHeaderBuilder.mProfiles != null) {
            for (IProfile profile : mAccountHeaderBuilder.mProfiles) {
                if (profile != null) {
                    if (profile.getIdentifier() == identifier) {
                        setActiveProfile(profile, fireOnProfileChanged);
                        return;
                    }
                }
            }
        }
    }
880234
def setProfile(self, profile):
        
        self._profile = profile
        
        # update the interface
        self.setIcon(profile.icon())
        self.setText(profile.name())
        self.setToolTip(profile.description())
670531
def handle_profile_save(self, sender, instance, **kwargs):
    
    self.handle_save(instance.user.__class__, instance.user)
491732
protected void setProfileFactory(final Function<Object[], P> profileFactory) {
        CommonHelper.assertNotNull("profileFactory", profileFactory);
        this.newProfile = profileFactory;
    }