Skip to content

Commit

Permalink
Tidy up non-Go code
Browse files Browse the repository at this point in the history
  • Loading branch information
deanishe committed Oct 18, 2019
1 parent 1bfc39a commit c24de3c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
12 changes: 6 additions & 6 deletions bench.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
# encoding: utf-8
#
# Copyright (c) 2018 Dean Jackson <[email protected]>
Expand Down Expand Up @@ -33,14 +33,14 @@
BUNDLE_ID = 'net.deanishe.awgo'

TPL_ONE = """\
Application('Alfred 3').setConfiguration('{key}', {{
Application('com.runningwithcrayons.Alfred').setConfiguration('{key}', {{
toValue: '{value}',
inWorkflow: '{bid}'
}});
"""

TPL_MANY = """\
var alfred = Application('Alfred 3');
var alfred = Application('com.runningwithcrayons.Alfred');
"""

TPL_LINE = """\
Expand Down Expand Up @@ -127,23 +127,23 @@ def main():
logs = []

if SINGLE:
for i in range(REPS):
for _ in range(REPS):
start = time()
single()
cumone += time() - start

logs.append('single: %0.1fs (%0.3fs/rep)' % (cumone, cumone / REPS))

if MULTI:
for i in range(REPS):
for _ in range(REPS):
start = time()
multiple()
cumall += time() - start

logs.append('multi: %0.1fs (%0.3fs/rep)' % (cumall, cumall / REPS))

if MULTI_ALT:
for i in range(REPS):
for _ in range(REPS):
start = time()
multiple_alt()
cumalt += time() - start
Expand Down
7 changes: 2 additions & 5 deletions env.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env zsh

# Workflow environment variables
# These variables create an Alfred-like environment
# root="$( dirname "$0" )"

root="$( git rev-parse --show-toplevel )"
testdir="${root}/testenv"
Expand All @@ -9,13 +10,9 @@ testdir="${root}/testenv"
export alfred_workflow_bundleid="net.deanishe.awgo"
export alfred_workflow_data="${testdir}/data"
export alfred_workflow_cache="${testdir}/cache"
# export alfred_workflow_cache="$HOME/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.awgo"
# export alfred_workflow_data="$HOME/Library/Application Support/Alfred/Workflow Data/net.deanishe.awgo"

test -f "$HOME/Library/Preferences/com.runningwithcrayons.Alfred.plist" || {
export alfred_version="3.8.1"
# export alfred_workflow_cache="$HOME/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/net.deanishe.awgo"
# export alfred_workflow_data="$HOME/Library/Application Support/Alfred 3/Workflow Data/net.deanishe.awgo"
}

# Expected by ExampleNew
Expand Down
2 changes: 2 additions & 0 deletions util/testdata/bash.sh
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#!/bin/bash

echo "$1"

0 comments on commit c24de3c

Please sign in to comment.