当前位置: 首页>>代码示例>>Python>>正文


Python grinder.sleep函数代码示例

本文整理汇总了Python中net.grinder.script.Grinder.grinder.sleep函数的典型用法代码示例。如果您正苦于以下问题:Python sleep函数的具体用法?Python sleep怎么用?Python sleep使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了sleep函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: page9

  def page9(self):
    """GET standard (requests 901-902)."""
    self.token_studentSortField = \
      'last_name'
    self.token__ = \
      '1295903049193'
    result = request901.GET('/outcomes/assessment/results/group/standard' +
      '?assessmentId=' +
      self.token_assessmentId +
      '&classeId=' +
      self.token_classeId +
      '&studentSortField=' +
      self.token_studentSortField +
      '&standardSortField=' +
      self.token_standardSortField +
      '&_=' +
      self.token__)

    grinder.sleep(107)
    self.token__ = \
      '1295903049729'
    request902.GET('/outcomes/static/common/js/widgets/tooltip.js' +
      '?_=' +
      self.token__)

    return result
开发者ID:yzhu1,项目名称:wgspring,代码行数:26,代码来源:02_matrix_view.py

示例2: page10

  def page10(self):
    """GET results (requests 1001-1004)."""
    self.token_itemSortField = \
      'performance'
    self.token__ = \
      '1295903065533'
    result = request1001.GET('/outcomes/assessment/results' +
      '?assessmentId=' +
      self.token_assessmentId +
      '&classeId=' +
      self.token_classeId +
      '&studentSortField=' +
      self.token_studentSortField +
      '&itemSortField=' +
      self.token_itemSortField +
      '&_=' +
      self.token__)

    grinder.sleep(122)
    request1002.GET('/outcomes/static/images/matrix/exclamation_point_cell_darks.png')

    grinder.sleep(14)
    request1003.GET('/outcomes/static/images/matrix/dash_cell.png')

    self.token__ = \
      '1295903065986'
    request1004.GET('/outcomes/static/common/js/widgets/tooltip.js' +
      '?_=' +
      self.token__)

    return result
开发者ID:yzhu1,项目名称:wgspring,代码行数:31,代码来源:02_matrix_view.py

示例3: page21

  def page21(self):
    """GET alignedToNode (requests 2101-2103)."""
    self.token__ = \
      '1295890935857'
    self.token_nodeId = \
      '51848'
    result = request2101.GET('/oib/passage/manage/alignedToNode' +
      '?_=' +
      self.token__ +
      '&sort=' +
      self.token_sort +
      '&sortDir=' +
      self.token_sortDir +
      '&nodeId=' +
      self.token_nodeId +
      '&page=' +
      self.token_page +
      '&forSelect=' +
      self.token_forSelect +
      '&searchString=' +
      self.token_searchString +
      '&filterString=' +
      self.token_filterString)

    grinder.sleep(14132)
    request2102.GET('/oib/static/images/view_overlay/border.png')

    request2103.GET('/oib/static/images/view_overlay/close_X.png')

    return result
开发者ID:yzhu1,项目名称:wgspring,代码行数:30,代码来源:05_manage_passages.py

示例4: page17

  def page17(self):
    """POST viewItem (requests 1701-1704)."""
    result = request1701.POST('/oib/viewItem',
      ( NVPair('id', '1346'),
        NVPair('version', '1'), ),
      ( NVPair('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'), ))

    grinder.sleep(27)
    self.token__ = \
      '1295903684110'
    request1702.GET('/oib/static/js/widgets/sharing.js' +
      '?_=' +
      self.token__)

    grinder.sleep(53)
    self.token__ = \
      '1295903684165'
    request1703.GET('/oib/static/js/widgets/SharingDropdown.js' +
      '?_=' +
      self.token__)

    self.token__ = \
      '1295903684173'
    request1704.GET('/oib/static/common/js/3p/jqueryMultiSelect.js' +
      '?_=' +
      self.token__)

    return result
开发者ID:yzhu1,项目名称:wgspring,代码行数:28,代码来源:10_align_standards.py

示例5: page20

  def page20(self):
    """GET alignedToSubtree (requests 2001-2003)."""
    self.token__ = \
      '1295891998691'
    result = request2001.GET('/oib/rubric/manage/alignedToSubtree' +
      '?_=' +
      self.token__ +
      '&sort=' +
      self.token_sort +
      '&sortDir=' +
      self.token_sortDir +
      '&nodeId=' +
      self.token_nodeId +
      '&forSelect=' +
      self.token_forSelect +
      '&searchString=' +
      self.token_searchString +
      '&filterString=' +
      self.token_filterString)

    grinder.sleep(15312)
    request2002.GET('/oib/static/images/view_overlay/border.png')

    request2003.GET('/oib/static/images/view_overlay/close_X.png')

    return result
开发者ID:yzhu1,项目名称:wgspring,代码行数:26,代码来源:06_manage_rubrics.py

示例6: page8

  def page8(self):
    """GET getFiltered (requests 801-803)."""
    self.token__ = \
      '1295893897288'
    self.token_filterId = \
      'pool5'
    self.token_forSelect = \
      'true'
    result = request801.GET('/oib/assessment/manage/getFiltered' +
      '?_=' +
      self.token__ +
      '&subject=' +
      self.token_subject +
      '&sort=' +
      self.token_sort +
      '&sortDir=' +
      self.token_sortDir +
      '&filterId=' +
      self.token_filterId +
      '&page=' +
      self.token_page +
      '&forSelect=' +
      self.token_forSelect)

    grinder.sleep(6478)
    request802.GET('/oib/static/images/view_overlay/border.png')

    request803.GET('/oib/static/images/view_overlay/close_X.png')

    return result
开发者ID:yzhu1,项目名称:wgspring,代码行数:30,代码来源:08_manage_assessments.py

示例7: run_test_set

    def run_test_set(self, test_set):
        """Overridden from WebtestRunner base class, to record the
        response for each request.
        """
        for filename in test_set.filenames:
            log("========== Executing: %s ==========" % filename)
            # Add an empty list to the responses dict, if it doesn't exist
            if filename not in self.webtest_responses:
                self.webtest_responses[filename] = []

            # Execute all requests in this test set, in order
            for test, wrapper, request in WebtestRunner.webtest_requests[filename]:
                # Try to correlate this request with previous responses
                # in the current webtest file
                self.correlate(filename, request)

                # Execute this request
                try:
                    response = self.execute(test, wrapper, request)
                # If problems occurred, report an error and re-raise
                except RuntimeError:
                    grinder.statistics.forLastTest.success = False
                    raise
                # Otherwise, store the test number and response body
                else:
                    body = response.getText()
                    self.webtest_responses[filename].append((test.getNumber(), body))

                # If response was not valid, report an error
                if response.getStatusCode() >= 400:
                    grinder.statistics.forLastTest.success = False

                # Sleep
                grinder.sleep(WebtestRunner.think_time)
开发者ID:a-e,项目名称:grinder-webtest,代码行数:34,代码来源:correlate.py

示例8: page1

  def page1(self):
    """GET / (requests 101-107)."""
    
    # Expecting 302 'Found'
    result = request101.GET('/')

    grinder.sleep(16)
    
    # Expecting 302 'Moved Temporarily'
    request102.GET('/wgen/index.jsp')

    grinder.sleep(31)
    request103.GET('/wgen/Login.do')

    grinder.sleep(125)
    request104.GET('/wgen/amp/js/googleAnalytics.js')

    request105.GET('/wgen/amp/css/main.css')

    grinder.sleep(31)
    request106.GET('/wgen/amp/js/scripts.js')

    grinder.sleep(15)
    request107.GET('/wgen/amp/flash_detect/Dispatch.js')

    return result
开发者ID:yzhu1,项目名称:wgspring,代码行数:26,代码来源:03_change_cut_scores.py

示例9: page22

  def page22(self):
    """POST viewPassage (requests 2201-2207)."""
    result = request2201.POST('/oib/viewPassage',
      ( NVPair('id', '1342'),
        NVPair('version', '1'), ),
      ( NVPair('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'), ))

    grinder.sleep(17)
    request2202.GET('/oib/static/images/tooltips/tooltip_win_arrow_top.png')

    request2203.GET('/oib/static/css/standards_create.css')

    request2204.GET('/oib/static/css/widgets/shopping_cart.css')

    self.token__ = \
      '1295890950579'
    request2205.GET('/oib/static/js/widgets/sharing.js' +
      '?_=' +
      self.token__)

    grinder.sleep(24)
    self.token__ = \
      '1295890950607'
    request2206.GET('/oib/static/js/widgets/SharingDropdown.js' +
      '?_=' +
      self.token__)

    self.token__ = \
      '1295890950624'
    request2207.GET('/oib/static/common/js/3p/jqueryMultiSelect.js' +
      '?_=' +
      self.token__)

    return result
开发者ID:yzhu1,项目名称:wgspring,代码行数:34,代码来源:05_manage_passages.py

示例10: page17

  def page17(self):
    """GET analysis (requests 1701-1704)."""
    self.token__ = \
      '1296067539166'
    self.token_scorable_component_id = \
      '295'
    result = request1701.GET('/outcomes/item/analysis' +
      '?_=' +
      self.token__ +
      '&assessment_id=' +
      self.token_assessment_id +
      '&scorable_component_id=' +
      self.token_scorable_component_id +
      '&classe_id=' +
      self.token_classe_id)

    grinder.sleep(15)
    request1702.GET('/outcomes/static/images/matrix/item_overlay/overlay_B_gr.png')

    grinder.sleep(46)
    request1703.GET('/outcomes/static/images/matrix/item_overlay/click_to_close.png')

    request1704.GET('/outcomes/static/images/matrix/item_overlay/overlay_A_red.png')

    return result
开发者ID:yzhu1,项目名称:wgspring,代码行数:25,代码来源:02_matrix_view.py

示例11: page18

  def page18(self):
    """GET hex (requests 1801-1811)."""
    self.token_hex_id = \
      '1'
    result = request1801.GET('/outcomes/map/hex' +
      '?hex_id=' +
      self.token_hex_id)

    request1802.GET('/outcomes/static/images/learningMap/standard_overlay/frame_insufficient_data.png')

    request1803.GET('/outcomes/static/images/learningMap/standard_overlay/frame_insideTOP.png')

    request1804.GET('/outcomes/static/images/learningMap/standard_overlay/frame_insideLEFT.png')

    request1805.GET('/outcomes/static/images/learningMap/standard_overlay/frame_inside.png')

    request1806.GET('/outcomes/static/images/learningMap/standard_overlay/frame_insideRIGHT.png')

    request1807.GET('/outcomes/static/images/learningMap/standard_overlay/frame_insideBOTTOM.png')

    request1808.GET('/outcomes/static/images/learningMap/standard_overlay/expand_list.png')

    request1809.GET('/outcomes/static/images/learningMap/standard_overlay/pts_row_headers_clear_bg_box_ends.png')

    request1810.GET('/outcomes/static/images/learningMap/standard_overlay/icon_student_clear_for_filling.png')

    grinder.sleep(16)
    request1811.GET('/outcomes/static/images/learningMap/standard_overlay/item_number_row_bg.png')

    return result
开发者ID:yzhu1,项目名称:wgspring,代码行数:30,代码来源:02_matrix_view.py

示例12: page19

  def page19(self):
    """GET standard (requests 1901-1902)."""
    self.token_standardSortField = \
      'id'
    self.token__ = \
      '1295903176536'
    result = request1901.GET('/outcomes/assessment/results/group/standard' +
      '?assessmentId=' +
      self.token_assessmentId +
      '&classeId=' +
      self.token_classeId +
      '&studentSortField=' +
      self.token_studentSortField +
      '&standardSortField=' +
      self.token_standardSortField +
      '&_=' +
      self.token__)

    grinder.sleep(111)
    self.token__ = \
      '1295903177043'
    request1902.GET('/outcomes/static/common/js/widgets/tooltip.js' +
      '?_=' +
      self.token__)

    return result
开发者ID:yzhu1,项目名称:wgspring,代码行数:26,代码来源:02_matrix_view.py

示例13: __call__

    def __call__(self):
        log = grinder.logger.info

        trader = homeTest.create()

        tradeTest = tests["trade"].wrap(trader)

        stocksToSell = {"BEAS": 100, "MSFT": 999}
        for stock, amount in stocksToSell.items():
            tradeResult = tradeTest.sell("John", stock, amount)
            log("Result of tradeTest.sell(): %s" % tradeResult)

        grinder.sleep(100)  # Idle a while

        stocksToBuy = {"BEAS": abs(random.nextInt()) % 1000}
        for stock, amount in stocksToBuy.items():
            tradeResult = tradeTest.buy("Phil", stock, amount)
            log("Result of tradeTest.buy(): %s" % tradeResult)

        queryTest = tests["query"].wrap(trader)
        balance = queryTest.getBalance()
        log("Balance is $%.2f" % balance)

        trader.remove()  # We don't record the remove() as a test

        # Can obtain information about the thread context...
        if grinder.threadNumber == 0 and grinder.runNumber == 0:
            # ...and navigate from the proxy back to the test
            d = queryTest.__test__
            log("Query test is test %d, (%s)" % (d.number, d.description))
开发者ID:gwestersfdc,项目名称:GrinderWithForceConnector,代码行数:30,代码来源:ejb.py

示例14: __call__

 def __call__(self):
   """This method is called for every run performed by the worker thread."""
   
   self.initSession()
   self.auth()
   self.bind()
   self.requestSession()
   self.getRoster()
   
   message = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis rutrum porttitor ante. Nunc arcu leo."
   show = "chat"
   
   #for i in range(2):
   while(True):
     if show == "dnd":
       show = "chat"
     else:
       show = "dnd"
     self.changePresence(show)
     if grinder.statistics.forLastTest.time < 5000:
       grinder.sleep(5000 - grinder.statistics.forLastTest.time)
     for j in range(5):
       self.sendMessage(message, self.targetUser)
       if grinder.statistics.forLastTest.time < 5000:
         grinder.sleep(5000 - grinder.statistics.forLastTest.time)
   
   self.terminate()
开发者ID:b-cuts,项目名称:bosh_loadtest,代码行数:27,代码来源:one2one.py

示例15: page22

  def page22(self):
    """GET standard (requests 2201-2202)."""
    self.token_assessmentId = \
      '25'
    self.token__ = \
      '1295903198668'
    result = request2201.GET('/outcomes/assessment/results/group/standard' +
      '?assessmentId=' +
      self.token_assessmentId +
      '&classeId=' +
      self.token_classeId +
      '&studentSortField=' +
      self.token_studentSortField +
      '&standardSortField=' +
      self.token_standardSortField +
      '&_=' +
      self.token__)

    grinder.sleep(177)
    self.token__ = \
      '1295903199063'
    request2202.GET('/outcomes/static/common/js/widgets/tooltip.js' +
      '?_=' +
      self.token__)

    return result
开发者ID:yzhu1,项目名称:wgspring,代码行数:26,代码来源:02_matrix_view.py


注:本文中的net.grinder.script.Grinder.grinder.sleep函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。